Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit e004156f authored by g4m4's avatar g4m4
Browse files

[SCRIPTS] Fix long standing issue with folders renaming

parent e08f8a98
No related branches found
No related tags found
No related merge requests found
Pipeline #53553 failed
......@@ -102,10 +102,16 @@ def RenameDirectories(root_dir, name_lower):
@param root_dir Root directory to walk into
@param name_lower Name to replace folders with
'''
# This is hardcoded for now
# TODO(gm): find something better
shutil.move(os.path.join(root_dir, "sandbox"),
os.path.join(root_dir, name_lower))
dirs_list = []
for root, dirs, files in os.walk(root_dir):
for dir in dirs:
if(dir == "sandbox"):
dirs_list.append(os.path.join(os.path.relpath(root,root_dir),dir))
break
for dir in dirs_list:
src = os.path.join(root_dir, dir)
dest = src.replace("sandbox", name_lower)
shutil.move(src, dest)
def SetupProject(sandbox_root, dest_dir, name):
'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment