From 2dbcccfc9d938340ff8d730d14d6adaf2d52ea21 Mon Sep 17 00:00:00 2001 From: Roland Date: Sun, 10 Mar 2024 16:47:31 -0600 Subject: [PATCH] Raising error when attempting to move a mounted file. --- wrolpi/files/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wrolpi/files/api.py b/wrolpi/files/api.py index ae6e8dad..2f8d2dbd 100644 --- a/wrolpi/files/api.py +++ b/wrolpi/files/api.py @@ -217,6 +217,8 @@ async def post_move(_: Request, body: schema.Move): for source in sources: if not source.exists(): raise FileNotFoundError(f'Cannot find {source} to move') + if source.is_mount(): + raise FileConflict(f'Cannot move mounted directory!') try: await lib.move(destination, *sources)