diff options
author | toonn <toonn@toonn.io> | 2019-11-07 22:37:50 +0100 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2019-11-07 22:37:50 +0100 |
commit | 28f3d0144b8371ca5ccb85e18d5936f39ce4ca17 (patch) | |
tree | 8d677e589a2cd54e95e49f4f8a3941675cf13b38 | |
parent | dab04350b2a3d55e762b0a2f855c5faf4ca61d61 (diff) | |
parent | 7aafd6b47e020085b298c4693ee4618447fdbfba (diff) | |
download | ranger-28f3d0144b8371ca5ccb85e18d5936f39ce4ca17.tar.gz |
Merge branch 'paste-non-existing-target'
-rw-r--r-- | ranger/core/actions.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 25b01e2c..18302431 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -1597,13 +1597,15 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m Paste the selected items into the current directory or to dest if provided. """ - if dest is None or isdir(dest): + if dest is None: + dest = self.thistab.path + if isdir(dest): loadable = CopyLoader(self.copy_buffer, self.do_cut, overwrite, dest) self.loader.add(loadable, append=append) self.do_cut = False else: - self.notify('Failed to paste. The given path is invalid.', bad=True) + self.notify('Failed to paste. The destination is invalid.', bad=True) def delete(self, files=None): # XXX: warn when deleting mount points/unseen marked files? |