From fa419ceff282da0d8426909f5c7d044cad708bca Mon Sep 17 00:00:00 2001 From: toonn Date: Sat, 28 Dec 2019 19:06:57 +0100 Subject: Avoid adding newlines to paths --- ranger/config/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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!") -- cgit v1.2.3