diff --git a/src/redux/thunks/file.ts b/src/redux/thunks/file.ts index 7e204a7..7930f31 100644 --- a/src/redux/thunks/file.ts +++ b/src/redux/thunks/file.ts @@ -1030,6 +1030,12 @@ export function submitCreateNew(index: number, name: string, type: number): AppT }), ); + // if name does not contain "/", append cache + if (name.includes("/")) { + dispatch(refreshFileList(index)); + return newFile; + } + const newList = fm.list?.files ? [...fm.list.files, newFile] : [newFile]; if (newList) { dispatch(setFileList({ index: FileManagerIndex.main, value: newList }));