summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2019-12-28 19:06:57 +0100
committertoonn <toonn@toonn.io>2019-12-28 19:06:57 +0100
commitfa419ceff282da0d8426909f5c7d044cad708bca (patch)
treea904663f7892c65e8b7168f3f3ea381fb54405c1
parent6ffe1183daa665e3790ad456119f7705263af3da (diff)
Avoid adding newlines to paths
-rwxr-xr-xranger/config/commands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index d1e4bdbc..554ea1f8 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -1084,7 +1084,7 @@ class bulkrename(Command):
self.fm.execute_file([File(listpath)], app='editor')
with (open(listpath, 'r', encoding="utf-8", errors="surrogateescape") if
py3 else open(listpath, 'r')) as listfile:
- new_filenames = listfile.readlines()
+ new_filenames = listfile.read().split("\n")
os.unlink(listpath)
if all(a == b for a, b in zip(filenames, new_filenames)):
self.fm.notify("No renaming to be done!")