sole / aafm

Android ADB file manager
GNU General Public License v3.0
222 stars 50 forks source link

uncaught error caused by dangling symbolic links in local directory #49

Closed equalsJeffH closed 10 years ago

equalsJeffH commented 11 years ago

Start aafm-gui.py in a directory where there is a symbolic link pointing to a file or directory that no longer exists, and aafm-gui.py exits.

For example...

ls -l /home/foobar/plugins lrwxrwxrwx 1 foobar foobar 40 2011-01-12 15:04 /home/foobar/plugins -> /usr/local/mozilla/firefox-3.6.x/plugins

ls -l /usr/local/mozilla/firefox-3.6.x/plugins ls: cannot access /usr/local/mozilla/firefox-3.6.x/plugins: No such file or directory

/usr/local/aafm/src/aafm-gui.py EXECUTE= adb shell ls --help Traceback (most recent call last): File "/usr/local/aafm/src/aafm-gui.py", line 808, in gui = Aafm_GUI() File "/usr/local/aafm/src/aafm-gui.py", line 141, in init self.refresh_host_files() File "/usr/local/aafm/src/aafm-gui.py", line 183, in refresh_host_files self.host_treeViewFile.load_data(self.dir_scan_host(self.host_cwd)) File "/usr/local/aafm/src/aafm-gui.py", line 241, in dir_scan_host size = os.path.getsize(path) File "/usr/lib/python2.6/genericpath.py", line 49, in getsize return os.stat(filename).st_size OSError: [Errno 2] No such file or directory: '/home/foobar/plugins'

Removing the dangling symbolic link worksaround the problem.

It would be nice if aafm would simply ignore such dangling symbolic links.

[ Yes, I used this situation to get around to cleaning up that directory, but still... ]

sole commented 11 years ago

Well that's quite a situation!

I'll look into that when I've got time, and a computer which can run aafm :-/

sole commented 10 years ago

fixed? with pr #58