Code::Blocks Forums
User forums => Help => Topic started by: rapsadoodle on January 20, 2018, 10:45:34 am
-
Whenever we create a new project with CodeBlocks and try to save it anywhere in the Dropbox hierarchy we get this complaint:
"Warning Couldn't save project (Maybe the file was write-protected?)"
We're running CodeBlocks 17.12 and Dropbox desktop v41.4.80.
I haven't seen any other programs with trouble saving to this Dropbox directory.
It only gives the warning once and it does appear to have actually saved the project.
It only happens while the Dropbox desktop application is running.
Have fun,
Your friend rapsadoodle
-
codeblocks uses this strategy to save a file:
1) create a temp file and save the content
2) copy the temp file over the actual file
3) remove the temp file
This is the most save strategy to save files. Dropbox can make a lot conflicts with this strategy:
in step 2) block the actual file from the copy, because it is indexing
in step 3) block the temp file from deleting, because of indexing
i am not sure, but i think there is a setting to configure the save strategy somewhere in the settings. you can try to modify this.
But i don't see any way to fix this beside stepping away from the current good saving strategy... Does dropbox has a ignore file? You can try to add the temp file to the ignore file list....
-
Hi BlueHazzard,
Sounds like you've identified the cause of the problem. I'd posted a similar query in a Dropbox forum where there were some good questions posed to me, so I copied most of your enlightening answer there:
https://www.dropboxforum.com/t5/Installation-and-desktop-app/CodeBlocks-has-trouble-saving-a-new-project-in-the-Dropbox/m-p/261517#M48591 (https://www.dropboxforum.com/t5/Installation-and-desktop-app/CodeBlocks-has-trouble-saving-a-new-project-in-the-Dropbox/m-p/261517#M48591)
I did look in the CodeBlocks settings to modify the save strategy, but I couldn't find anything that looked like it would make a difference.
Dropbox does not have such an ignore file, that I could find, but perhaps my response post there will bring further enlightenment.
Thanks for you thoughts.
-
Yes the setting i was thinking of is only for auto save, and not for the normal save process....
i am afraid, there is no easy solution for this... At least not from codeblocks part...
-
Well, it's a pretty minor problem, and I think I got great help here with the identification of the problem.
Thanks and have fun.
-
i find it interesting that the file gets saved correctly....
-
Hello!
Also I had the same problem, I thought is the Dropbox but it isn't. The problem is Code Blocks, it has some kind of length limit of the project name, I made some tests and the limit is 27 characters.