mirror of
https://git.srhtnin.garden/sarah/SaraView.git
synced 2026-10-14 18:38:11 +02:00
Added modals for popups, and fixed root-level bug.
This commit is contained in:
1 parent
9736a55e00
commit
104198036a
11 files changed
+312
-62
No files matched your search
+4
-3
@@ -23,7 +23,7 @@ from Auth import (
|
||||
)
|
||||
from BookReader import ReadBookForFile
|
||||
from Blame import LoadBlame, RenameUserInBlame, UpdateBlameOnSave
|
||||
from Core import ResolvePath
|
||||
from Core import NormalizeRelativePath, ResolvePath
|
||||
from Embeds import BuildOgTags
|
||||
from Editor import WriteTextFile
|
||||
from Explorer import (
|
||||
@@ -440,10 +440,11 @@ def PatchTreeEndpoint(
|
||||
) -> dict:
|
||||
RequirePathAccessible(Root, Path, CurrentUser)
|
||||
|
||||
ParentPath = Path.rsplit("/", 1)[0] if "/" in Path else ""
|
||||
|
||||
if Body.DestinationPath:
|
||||
Destination = Body.DestinationPath
|
||||
Destination = NormalizeRelativePath(ParentPath, Body.DestinationPath)
|
||||
elif Body.NewName:
|
||||
ParentPath = Path.rsplit("/", 1)[0] if "/" in Path else ""
|
||||
Destination = f"{ParentPath}/{Body.NewName}" if ParentPath else Body.NewName
|
||||
else:
|
||||
raise HTTPException(status_code=400, detail="Provide NewName or DestinationPath.")
|
||||
|
||||
Reference in new issue
Block a user