[Github-comments] [geany/geany] [bug][1.35][debian][severe] Geany delete file-entries from the project if files cannot be found (#2155)

Evgueni Antonov notifications at xxxxx
Tue May 14 16:48:28 UTC 2019


**PROBLEM:**

Upon opening a Geany project, if some of the files cannot be found:
1. No error message is generated, the status tab shows message not listing what was not opened
2. 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.

**PROPOSED SOLUTION -- Geany must NOT automatically decide what to do:**

1. The status tab should show message exactly which files were not opened
2. 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:
1. Debian 9
2. Lxde
3. sshfs installed
4. remote filesystem mounted on /mnt/abc

**Steps to reproduce:**
0. Mount a remote filesystem with sshfs:
sudo sshfs -o allow_other myuser at somehost:/abc/bcd/abc /mnt/abc
1. Open Geany
2. Open some files from the mounted partition
3. Open few files from a local partition too
4. Create new project with the currently opened files and make sure the project file is saved in the default geany project directory
5. Close the project
6. 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**
7. Unmount the mounted partition from Step 0.
8. Open Geany
9. 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."**
10. Close the project (or directly close Geany)
11. 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.** 


$ 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...


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2155
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190514/c55e0cc6/attachment-0001.html>


More information about the Github-comments mailing list