mirror of https://github.com/devine-dl/devine.git
Fix the file move in `wvd add` when the WVDs folder does not exist
On new installs, or where the `WVDs` folder is not made yet, then the shutil.move() assumes it's a file path and moves the `.wvd` file to the WVDs folder path, as a file. If the folder existed but was empty, this error wouldn't have occurred.
This commit is contained in:
parent
55a86ac6c9
commit
8e7a63f0b9
|
@ -39,7 +39,7 @@ def add(paths: list[Path]) -> None:
|
|||
else:
|
||||
# TODO: Check for and log errors
|
||||
_ = Device.load(path) # test if WVD is valid
|
||||
shutil.move(path, config.directories.wvds)
|
||||
shutil.move(path, dst_path)
|
||||
log.info(f"Added {path.stem}")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue