Skip to content

Commit

Permalink
fix: jans-linux-setup copy_tree
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Apr 30, 2022
1 parent e930f16 commit 2c2ad3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jans-linux-setup/jans_setup/setup_app/utils/setup_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,14 @@ def copyFile(self, inFile, destFolder, backup=True):
self.logIt("Error copying %s to %s" % (inFile, destFolder), True)

def copy_tree(self, src, dest, ignore=[]):
self.logIt("Copying directory {} to {}".format(src, dest))
if os.path.isdir(src):
if not os.path.isdir(dest):
os.makedirs(dest)
files = os.listdir(src)
for f in files:
if f not in ignore:
self.CopyTree(os.path.join(src, f), os.path.join(dest, f), ignore)
self.copy_tree(os.path.join(src, f), os.path.join(dest, f), ignore)
else:
shutil.copyfile(src, dest)

Expand Down

0 comments on commit 2c2ad3a

Please sign in to comment.