davemds pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/edgar.git/commit/?id=68c1369c185a1b1c555f40cf1acd12575474cefe

commit 68c1369c185a1b1c555f40cf1acd12575474cefe
Author: Dave Andreoli <d...@gurumeditation.it>
Date:   Fri Aug 11 08:03:17 2017 +0200

    Dropbox gadget: support db installation in /opt
    
    as found in the arch linux package
---
 GADGETS/dropbox/__init__.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/GADGETS/dropbox/__init__.py b/GADGETS/dropbox/__init__.py
index fdfb415..c53d308 100644
--- a/GADGETS/dropbox/__init__.py
+++ b/GADGETS/dropbox/__init__.py
@@ -99,9 +99,15 @@ class Dropbox(object):
         self._status_changed_cb = status_changed_cb
 
         self.BASE_FOLDER = os.path.expanduser('~/Dropbox')
-        self.DAEMON = os.path.expanduser('~/.dropbox-dist/dropboxd')
         self.PIDFILE = os.path.expanduser('~/.dropbox/dropbox.pid')
         self.CMD_SOCKET = os.path.expanduser('~/.dropbox/command_socket')
+        dist = os.path.expanduser('~/.dropbox-dist/dropboxd')
+        if os.path.exists(dist):
+            self.DAEMON = dist
+        elif os.path.exists('/opt/dropbox/dropboxd'):
+            self.DAEMON = '/opt/dropbox/dropboxd'
+        else:
+            self.DAEMON = None
 
         self._cmd_socket = None
         self._cmd_fdh = None
@@ -115,7 +121,7 @@ class Dropbox(object):
 
     @property
     def is_installed(self):
-        return os.path.exists(self.DAEMON)
+        return True if self.DAEMON is not None else False
 
     @property
     def is_running(self):

-- 


Reply via email to