From d01a6613f2a34c6fb5b92c1d661f9ab32a7c2086 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 12 Mar 2010 20:59:24 +0100 Subject: fixed shutli_generatorized.move() --- ranger/ext/shutil_generatorized.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py index 8c699f8e..8bf07ace 100644 --- a/ranger/ext/shutil_generatorized.py +++ b/ranger/ext/shutil_generatorized.py @@ -306,12 +306,8 @@ def move(src, dst, overwrite=False): """ real_dst = dst - if not overwrite and os.path.isdir(dst): - real_dst = os.path.join(dst, _basename(src)) - if os.path.exists(real_dst): - raise Error("Destination path '%s' already exists" % real_dst) if not overwrite: - real_dst = get_safe_path(real_dst) + real_dst = get_safe_path(os.path.join(dst, _basename(src))) try: os.rename(src, real_dst) except OSError: -- cgit 1.4.1-2-gfad0