From 8b6d506f932e1809a71593b5b951e7c74e898c8f Mon Sep 17 00:00:00 2001 From: Siddharth Ravikumar Date: Fri, 16 Jan 2015 09:24:47 -0500 Subject: [bug fix] combox/file.py: fixed bug in move_shards function the fix: the shards don't have to be renamed when the directory under which they're located is renamed/moved. --- combox/file.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/combox/file.py b/combox/file.py index 99050cf..a9f1208 100644 --- a/combox/file.py +++ b/combox/file.py @@ -136,6 +136,11 @@ def move_shards(src, dest, config): config: a dictionary containing configuration info about combox. """ + if path.basename(src) == path.basename(dest): + # this means the parent directory was rename, no the file + # itself! So we don't have to do anything. + return + nodes = get_nodedirs(config) src_rel_path = relative_path(src, config) -- cgit v1.2.3