Hi, I have a problem with Geany 1.37.1 (on Windows 10 Pro 64 bits). I have a file that I can open but trying to save it gets me an error message: "Error saving file. Error renaming temporary file: Permission denied The file on disk may now be truncated!"
This occurs after years of using Geany seamlessly. Can this be related to the fact that I have tried to input Unicode characters like "É" just before (unsuccessfully, by the way...), which I think I had never done before? The "Alt-144" method I use in other Windows applications did not work, so I tried the Ctrl-Shift-u method described in the Geany Help, to no success. The file name does not contain any accented character (not even those that are directly on my French keyboard like é,à... that have never caused me any trouble in Geany). At each attempt of file saving, I get a new file named .goutputstream-XXXXXX instead, with the content of the file I am trying to save. Saving "file.txt" is not possible but saving as a new version like "file_v2.txt" works. However, after opening again "file_v2.txt", trying to save it fails again (only works if I save it as "file_v3.txt" and so on). Creating, saving, reopening... new files works as expected. Opening, editing and saving the file in another editor works, but reopening it with Geany leads to the same problem.
Yours, Maxime
Ok, now that you have provided the error message it would appear you have two problems which happen to only be temporally related:
1. the file saving cannot rename the `.goutputstream-XXXXX` temporary file, the message says "permission denied", so that is probably your problem. Presuming you are saving to a local windows directory ensure you have permission to rename a file over an existing file and that nothing has the existing file open or locked at the time. If you are saving to a remote file ensure the same things as well as that the remote system allows renaming. If that does not work try setting the saving method that does not use rename by clearing both the `files.use_atomic_file_saving` and `files.use_gio_unsafe_file_saving` settings in the "Various" preferences, see [this wiki](https://wiki.geany.org/config/all_you_never_wanted_to_know_about_file_saving)
2. entering the character, for me typing `<ctrl><shift>u` `0` `0` `c` `9` `<enter>` gives an accented E, you need to describe in more detail what you did and what the result is.
Hello, For Unicode character input, I was mistaken about holding the ctrl-shift or not. Now it's OK. The strange thing is that after successfully typing my É, I was able to save my file once. Yes, only once! Trying again gave me the error message... Then I realized that the file is in my Dropbox folder, which might be part of the problem. I paused Dropbox synchronization, saved the file successfully, resumed synchronization and saved again successfully. But again, only once! I will continue to investigate... Yours, Maxime
PS: the Geany "Status" panel indicates: 09:27:47: Error saving file (Error renaming temporary file: Permission denied).
I am saving to a local folder (though on the second hard drive), but how to I "ensure I have permission to rename a file over an existing file and that nothing has the existing file open or locked at the time" as you suggest?
github-comments@lists.geany.org