From b910f0c90847ed0659bd5531f7b0b68536093de0 Mon Sep 17 00:00:00 2001 From: Kwang Moo Yi Date: Mon, 29 May 2017 16:15:54 +0200 Subject: [PATCH] Fixes dropbox path issue (#369) 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. --- src/path.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path.py b/src/path.py index b15aa89b..b536ea30 100644 --- a/src/path.py +++ b/src/path.py @@ -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