diff options
-rw-r--r-- | ranger/__init__.py | 11 | ||||
-rw-r--r-- | ranger/core/loader.py | 7 | ||||
-rwxr-xr-x | ranger/data/scope.sh | 2 |
3 files changed, 12 insertions, 8 deletions
diff --git a/ranger/__init__.py b/ranger/__init__.py index 2228d40e..fabaeae9 100644 --- a/ranger/__init__.py +++ b/ranger/__init__.py @@ -21,10 +21,13 @@ def version_helper(): import subprocess version_string = 'ranger-master {0}' try: - git_describe = subprocess.check_output(['git', 'describe'], - universal_newlines=True, - stderr=subprocess.PIPE) - version_string = version_string.format(git_describe.strip('\n')) + git_describe = subprocess.Popen(['git', 'describe'], + universal_newlines=True, + cwd=RANGERDIR, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + (git_description, _) = git_describe.communicate() + version_string = version_string.format(git_description.strip('\n')) except (OSError, subprocess.CalledProcessError): version_string = version_string.format(__version__) return version_string diff --git a/ranger/core/loader.py b/ranger/core/loader.py index 96d000ac..26b729b6 100644 --- a/ranger/core/loader.py +++ b/ranger/core/loader.py @@ -101,9 +101,10 @@ class CopyLoader(Loadable, FileManagerAware): # pylint: disable=too-many-instan if path == fobj.path or str(path).startswith(fobj.path): tag = self.fm.tags.tags[path] self.fm.tags.remove(path) - self.fm.tags.tags[ - path.replace(fobj.path, path.join(self.original_path, fobj.basename)) - ] = tag + new_path = path.replace( + fobj.path, + os.path.join(self.original_path, fobj.basename)) + self.fm.tags.tags[new_path] = tag self.fm.tags.dump() n = 0 for n in shutil_g.move(src=fobj.path, dst=self.original_path, diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index e9c10916..9202146d 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -101,7 +101,7 @@ handle_image() { local mimetype="${1}" case "${mimetype}" in # SVG - # image/svg+xml) + # image/svg+xml|image/svg) # convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6 # exit 1;; |