mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Raising error when attempting to move a mounted file.
This commit is contained in:
parent
a486a39b73
commit
2dbcccfc9d
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue