Commit 9a7e2ee7 by sikang

update

parent cd645e0f
...@@ -89,9 +89,11 @@ class PackageGarble: ...@@ -89,9 +89,11 @@ class PackageGarble:
mapping[old_name] = new_name mapping[old_name] = new_name
print ("rename %s -> %s"%(dir,dir_name)) print ("rename %s -> %s"%(dir,dir_name))
break break
for (old,new) in mapping.items(): keys = sorted(mapping.keys(),
os.rename(old, new) key=lambda i: len(i.split("/")), reverse=True)
for key in keys:
os.rename(key, mapping[key])
def __process_files(self, path): def __process_files(self, path):
for root, dirs, files in os.walk(path): for root, dirs, files in os.walk(path):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment