Skip to content

Commit

Permalink
Fixes dropbox path issue (#369)
Browse files Browse the repository at this point in the history
In case of my path, dropbox downloads its files at

/home/usrid/.dropbox-dist/dropbox-lnx.x86_64-26.4.24

which makes the current code fail. A better way for this probably is to split by "/" and then check that the fith elem starts with drobox.
Here's a PR that does that.
  • Loading branch information
Kwang Moo Yi authored and bilelmoussaoui committed May 29, 2017
1 parent c517f14 commit b910f0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def dropbox_callback(directory):
directory(str): the default dropbox directory
"""
if path.isdir(directory):
sub_dir = directory.split("-")
return len(sub_dir) > 1 and sub_dir[0].lower() == "dropbox"
sub_dir = directory.split("/")
return len(sub_dir) > 1 and sub_dir[4].lower() == "dropbox"
return False


Expand Down

0 comments on commit b910f0c

Please sign in to comment.