You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon opening a Geany project, if some of the files cannot be found:
No error message is generated, the status tab shows message not listing what was not opened
Upon Geany exit (or project close, then geany exit), the actual project file is updated and the files which are not found get deleted from the project file files list
This way, both the user is not aware what went wrong AND the user loses files from the project.
I non-stop work with locally mounted remote filesystems and this issue is already really bothering, as connection sometimes just drops or simply sometimes I forget to mount the partitions. Either way, it's painful. I currently make backup of all my project files, as a workaround and restore the damaged project, if needed.
PROPOSED SOLUTION -- Geany must NOT automatically decide what to do:
The status tab should show message exactly which files were not opened
There must be a pop-up dialog:
2.1. Displayed message saying like "Some files cannot be opened" (maybe show list of the files, along with paths, preferably in a text area, so these could be copied in the clipboard, for troubleshooting purpose)
2.2. Button: "Retry"
In case files are on a remote filesystem and the partition was unmounted for some reason, user could mount the partition again and given the option to retry opening all missing files.
2.3. Button: "Cancel"
If "Cancel" is selected, nothing is re-opened, but also -- the project file must NOT be updated
2.4. Button: "Skip files and save project"
If this is selected, then the user chooses clearly both to lose the files from the project and have the project updated that way.
DETAILS:
I observed this issue with few previous Geany versions, but let's test with 1.35 (currently the last one).
My case is that the project files were on a locally mounted remote filesystem and then at some point the partition was not mounted, when this was observed. However I suspect, the same will happen if files are local, just missing.
Environment:
Debian 9
Lxde
sshfs installed
remote filesystem mounted on /mnt/abc
Steps to reproduce:
0. Mount a remote filesystem with sshfs:
sudo sshfs -o allow_other myuser@somehost:/abc/bcd/abc /mnt/abc
Open Geany
Open some files from the mounted partition
Open few files from a local partition too
Create new project with the currently opened files and make sure the project file is saved in the default geany project directory
Close the project
Close Geany OBSERVE:
The project file exists in the default geany directory /home/myuser/projects, open the file with (cat/vi/whatever) and see all files from the project are listed in the file
Unmount the mounted partition from Step 0.
Open Geany
Open the project created in Step 4. (use either Main Menu > Project > Open OR open it from the recent projects list) OBSERVE:
Only the files from the local partitions are opened. Status tab shows message "Failed to load one or more session files."
Close the project (or directly close Geany)
Close Geany OBSERVE:
While the project file still exists in /home/myuser/projects, it does not contain anymore the files from the remote partition from Step 2.
First, thank you for the comprehensive report with all the information we normally have to ask for.
You noted that this has been the behaviour of Geany projects for some time. That is because it is the intended behaviour. You see, a Geany "project" is nothing much more than a named session file, it keeps a list of a few settings and the files open. Therefore if a file in the list does not open it should be removed from the list.
So a Geany "project" is not like projects in Visual studio and some other IDEs where they need to know all files in the "project" to provide some extra functionality, like symbol management or build management. To get something like those sorts of functionality you can try the project plugins (there are several).
The status bar shows Failed to load one or more session files. Those files are shown in Help->Debug Messages. You could then either kill geany, mount and relaunch (or you could copy the .geany project file to a temporary file, close the project, mount the drive, copy the project file back and re-open).
PROBLEM:
Upon opening a Geany project, if some of the files cannot be found:
This way, both the user is not aware what went wrong AND the user loses files from the project.
I non-stop work with locally mounted remote filesystems and this issue is already really bothering, as connection sometimes just drops or simply sometimes I forget to mount the partitions. Either way, it's painful. I currently make backup of all my project files, as a workaround and restore the damaged project, if needed.
PROPOSED SOLUTION -- Geany must NOT automatically decide what to do:
2.1. Displayed message saying like "Some files cannot be opened" (maybe show list of the files, along with paths, preferably in a text area, so these could be copied in the clipboard, for troubleshooting purpose)
2.2. Button: "Retry"
In case files are on a remote filesystem and the partition was unmounted for some reason, user could mount the partition again and given the option to retry opening all missing files.
2.3. Button: "Cancel"
If "Cancel" is selected, nothing is re-opened, but also -- the project file must NOT be updated
2.4. Button: "Skip files and save project"
If this is selected, then the user chooses clearly both to lose the files from the project and have the project updated that way.
DETAILS:
I observed this issue with few previous Geany versions, but let's test with 1.35 (currently the last one).
My case is that the project files were on a locally mounted remote filesystem and then at some point the partition was not mounted, when this was observed. However I suspect, the same will happen if files are local, just missing.
Environment:
Steps to reproduce:
0. Mount a remote filesystem with sshfs:
sudo sshfs -o allow_other myuser@somehost:/abc/bcd/abc /mnt/abc
OBSERVE:
The project file exists in the default geany directory /home/myuser/projects, open the file with (cat/vi/whatever) and see all files from the project are listed in the file
OBSERVE:
Only the files from the local partitions are opened. Status tab shows message "Failed to load one or more session files."
OBSERVE:
While the project file still exists in /home/myuser/projects, it does not contain anymore the files from the remote partition from Step 2.
$ geany -V
geany 1.35 (built on 2019-04-29 with GTK 2.24.31, GLib 2.50.3)
$ geany -v
Geany-INFO: Geany 1.35, en_CA.UTF-8
Geany-INFO: GTK 2.24.31, GLib 2.50.3
Geany-INFO: System data dir: /usr/local/share/geany
Geany-INFO: User config dir: /home/eantonov/.config/geany
Geany-INFO: System plugin path: /usr/local/lib/geany
Geany-INFO: Added filetype Cython (61).
Geany-INFO: Added filetype JSON (62).
Geany-INFO: Added filetype Arduino (63).
Geany-INFO: Added filetype Clojure (64).
Geany-INFO: Added filetype Genie (65).
Geany-INFO: Added filetype Scala (66).
Geany-INFO: Added filetype Graphviz (67).
Geany-INFO: Added filetype CUDA (68).
Geany-INFO: Loaded libvte from libvte.so.9
Geany-INFO: Loaded: /usr/local/lib/geany/addons.so (Addons)
Geany-INFO: Loaded: /usr/local/lib/geany/htmlchars.so (HTML Characters)
Geany-INFO: Loaded: /usr/local/lib/geany/lipsum.so (Lipsum)
Geany-INFO: Loaded: /usr/local/lib/geany/pairtaghighlighter.so (Pair Tag Highlighter)
Geany-INFO: unknown : None (UTF-8)
Geany-INFO: Quitting...
The text was updated successfully, but these errors were encountered: