summaryrefslogtreecommitdiffstats
path: root/combox/file.py
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-01-16 09:24:47 -0500
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-01-16 09:24:47 -0500
commit8b6d506f932e1809a71593b5b951e7c74e898c8f (patch)
tree6f5c417334338a13a853d4dbe650a618db953ef0 /combox/file.py
parent6fb58d0cf2741b7edb6e92f576b8bcc744243095 (diff)
[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.
Diffstat (limited to 'combox/file.py')
-rw-r--r--combox/file.py5
1 files changed, 5 insertions, 0 deletions
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)