dsoprea / GDriveFS

An innovative FUSE wrapper for Google Drive.
GNU General Public License v2.0
662 stars 96 forks source link

Bug: cannot run gdfs default when folder does not exist #212

Closed Pablohn26 closed 4 years ago

Pablohn26 commented 4 years ago

When I run gdfs default /mnt/gdrivefs as documentation indicates, I get an error because the folder does not exist.

root@torrevalde:/home/pablo# gdfs default /mnt/gdrivefs
fuse: bad mount point `/mnt/gdrivefs': No such file or directory
Traceback (most recent call last):
  File "/usr/local/bin/gdfs", line 76, in <module>
    _main()
  File "/usr/local/bin/gdfs", line 73, in _main
    option_string=option_string)
  File "/usr/local/lib/python3.7/dist-packages/gdrivefs/gdfuse.py", line 924, in mount
    **fuse_opts)
  File "/usr/local/lib/python3.7/dist-packages/fuse.py", line 711, in __init__
    raise RuntimeError(err)
RuntimeError: 1
root@torrevalde:/home/pablo# mkdir /mnt/gdrivefs
root@torrevalde:/home/pablo# gdfs default /mnt/gdrivefs
root@torrevalde:/home/pablo# echo $?
0

Creating the folder fixes this issue

dsoprea commented 4 years ago

That's always the case with mounting and given that application has no idea how you'd like the directory to be owned or permissioned, it'd generally be bad practice to create user-facing directories for the user.

Pablohn26 commented 4 years ago

I agree with you, the application should not handle it, but the problem is there is no warning about the cause of the error, the folder does not exist. I will submit a PR to improve the error information