Skip to content

Commit

Permalink
Version 1.2.920:
Browse files Browse the repository at this point in the history
- find real path of installed programs
  • Loading branch information
Sergey Dryabzhinsky committed May 13, 2017
1 parent cd1645d commit 0058cab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dedupsqlfs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
__fsname__ = "dedupsqlfs"
__fsversion__ = "3.1"
# Future 1.3
__version__ = "1.2.919"
__version__ = "1.2.920"

# Check the Python version, warn the user if untested.
import sys
Expand Down
8 changes: 7 additions & 1 deletion dedupsqlfs/fuse/dedupfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ def startCacheFlusher(self):
if not self.getOption('use_cache_flusher'):
return

cf_path = os.path.join(os.path.dirname(sys.argv[0]), 'cache_flusher')
# Find real program path
# Cache flusher may be not installed with "common" programs
mf_path = sys.argv[0]
while os.path.islink(mf_path):
mf_path = os.path.abspath(os.readlink(mf_path))

cf_path = os.path.join(os.path.dirname(mf_path), 'cache_flusher')
if not os.path.isfile(cf_path):
self.getLogger().warning("Can't find cache flushing helper! By path: %r" % cf_path)
return
Expand Down

0 comments on commit 0058cab

Please sign in to comment.