Added automatic folder creation
This commit is contained in:
parent
9442a160c7
commit
23f762ae3b
1 changed files with 3 additions and 0 deletions
3
sync
3
sync
|
@ -22,6 +22,9 @@ synced_files = [
|
|||
|
||||
def save():
|
||||
for p in synced_files:
|
||||
folder = "/".join(p[0].split("/")[0:-1])
|
||||
if not os.path.exists(folder):
|
||||
os.mkdir(folder)
|
||||
os.system(f"rsync -r {p[1]} {p[0]}")
|
||||
|
||||
def restore():
|
||||
|
|
Loading…
Reference in a new issue