add check if mountpoint is mount
This commit is contained in:
parent
2eb0dbdac2
commit
7cfcef713e
1 changed files with 1 additions and 1 deletions
|
@ -310,7 +310,7 @@ def main(args):
|
|||
mountpoint = Path(os.path.join(os.environ['HOME'], args.mountpoint))
|
||||
if mountpoint.is_symlink():
|
||||
mountpoint.unlink();
|
||||
if mountpoint.exists():
|
||||
if mountpoint.exists() and not mountpoint.is_mount():
|
||||
if mountpoint.is_dir():
|
||||
if os.listdir(mountpoint):
|
||||
mountpoint.rename(str(mountpoint) + "-" + datetime.now().strftime("%Y-%m-%d")
|
||||
|
|
Loading…
Reference in a new issue