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:
rlaphoenix 2023-05-17 19:12:01 +01:00
parent 55a86ac6c9
commit 8e7a63f0b9
1 changed files with 1 additions and 1 deletions

View File

@ -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}")