From 8e7a63f0b9a822438ce9ab6dcbf44cae6551e0dd Mon Sep 17 00:00:00 2001
From: rlaphoenix <rlaphoenix@pm.me>
Date: Wed, 17 May 2023 19:12:01 +0100
Subject: [PATCH] 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.
---
 devine/commands/wvd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devine/commands/wvd.py b/devine/commands/wvd.py
index 693db3b..b0d7e5a 100644
--- a/devine/commands/wvd.py
+++ b/devine/commands/wvd.py
@@ -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}")