mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-20 09:57:35 +02:00
Checked source and target existence when move #4149
This commit is contained in:
parent
648d9400f3
commit
546a40a653
1 changed files with 4 additions and 2 deletions
|
@ -795,6 +795,8 @@ class InternalCommands:
|
||||||
os.symlink(source, target)
|
os.symlink(source, target)
|
||||||
|
|
||||||
def move(self, source, target):
|
def move(self, source, target):
|
||||||
|
if os.path.exists(source):
|
||||||
|
if not os.path.exists(target):
|
||||||
print 'move: ', source,'-->', target
|
print 'move: ', source,'-->', target
|
||||||
shutil.move(source, target)
|
shutil.move(source, target)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue