diff options
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r-- | ranger/core/actions.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index aef0d205..6bbb35aa 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -7,7 +7,7 @@ from __future__ import (absolute_import, division, print_function) import codecs import os -from os import link, symlink, getcwd, listdir, stat +from os import link, symlink, listdir, stat from os.path import join, isdir, realpath, exists import re import shlex @@ -74,6 +74,7 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m if self.metadata: self.metadata.reset() self.rifle.reload_config() + self.fm.tags.sync() def change_mode(self, mode=None): """:change_mode <mode> @@ -837,11 +838,11 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m self.ui.redraw_main_column() - def tag_remove(self, paths=None, movedown=None): - self.tag_toggle(paths=paths, value=False, movedown=movedown) + def tag_remove(self, paths=None, movedown=None, tag=None): + self.tag_toggle(paths=paths, value=False, movedown=movedown, tag=tag) - def tag_add(self, paths=None, movedown=None): - self.tag_toggle(paths=paths, value=True, movedown=movedown) + def tag_add(self, paths=None, movedown=None, tag=None): + self.tag_toggle(paths=paths, value=True, movedown=movedown, tag=tag) # -------------------------- # -- Bookmarks @@ -1372,9 +1373,9 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m self.notify(new_name) try: if relative: - relative_symlink(fobj.path, join(getcwd(), new_name)) + relative_symlink(fobj.path, join(self.fm.thisdir.path, new_name)) else: - symlink(fobj.path, join(getcwd(), new_name)) + symlink(fobj.path, join(self.fm.thisdir.path, new_name)) except OSError as ex: self.notify('Failed to paste symlink: View log for more info', bad=True, exception=ex) @@ -1383,7 +1384,7 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m for fobj in self.copy_buffer: new_name = next_available_filename(fobj.basename) try: - link(fobj.path, join(getcwd(), new_name)) + link(fobj.path, join(self.fm.thisdir.path, new_name)) except OSError as ex: self.notify('Failed to paste hardlink: View log for more info', bad=True, exception=ex) @@ -1391,7 +1392,7 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m def paste_hardlinked_subtree(self): for fobj in self.copy_buffer: try: - target_path = join(getcwd(), fobj.basename) + target_path = join(self.fm.thisdir.path, fobj.basename) self._recurse_hardlinked_tree(fobj.path, target_path) except OSError as ex: self.notify('Failed to paste hardlinked subtree: View log for more info', |