Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Unicode pathnames and user-mount convenience #154

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gdrivefs/gdfs/gdfuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,10 @@ def mount(auth_storage_filepath, mountpoint, debug=None, nothreads=None,
else:
v = True

# ignore the "user" option so we can put in fstab easily
if k == "user":
Copy link
Owner

@dsoprea dsoprea Jul 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not clear on why we need this. If we receive an unsupported option, it's just forwarded to FUSE. In this case, there is no such "user" option. So, it should work fine without this change.

Copy link
Author

@GoodGuysFree GoodGuysFree Jul 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a previous version I received an error when I put 'user' in the options in fstab, when I wanted to make mounting the GDriveFS user-mountable. I haven't used GDriveFS in a while, so I have no problem if you simply reject it. Sorry for causing a stir.

continue

# We have a list of provided options. See which match against our
# application options.

Expand Down
2 changes: 1 addition & 1 deletion gdrivefs/gdfs/opened_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def __init__(self, entry_id, path, filename, is_hidden, mime_type):
self.__is_loaded = False
self.__is_dirty = False

temp_filename = self.__entry_id.encode('ASCII')
temp_filename = self.__entry_id.encode('utf8')
om = get_om()
self.__temp_filepath = os.path.join(om.temp_path, temp_filename)

Expand Down
2 changes: 1 addition & 1 deletion gdrivefs/gdtool/normal_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def __convert(self, data):
return data

def get_data(self):
original = dict([(key.encode('ASCII'), value)
original = dict([(key.encode('utf8'), value)
for key, value
in self.__raw_data.iteritems()])

Expand Down