more dir path fixes

This commit is contained in:
Niklas 2021-08-24 15:59:12 +02:00
parent e06d28d75e
commit fbf1d8e916

View File

@ -113,12 +113,12 @@ const FileBrowser: React.FC = () => {
>
<div className="flex justify-between">
<Breadcrum path={path} onDirClick={(newPath)=>{
setPath(newPath)
setPath(normalizeDirPath(newPath))
}}/>
<div className="ml-auto">
<CreateDirButton
onPressed={async (dirName)=>{
const fullPath = normalizeDirPath(normalizeDirPath(path) + dirName)
const fullPath = normalizeDirPath(path + dirName)
await createDirMutation({variables:{path: fullPath}})
refetchDir()
}}
@ -150,7 +150,7 @@ const FileBrowser: React.FC = () => {
key={v?.id}
dir={v}
onClick={(dir)=>{
setPath(dir.id)
setPath(normalizeDirPath(dir.id))
}}
onContextMenu={(e)=>{
openDirContextMenu(e,v.id)