Explorar o código

:art: https://github.com/siyuan-note/siyuan/issues/4494

Vanessa %!s(int64=2) %!d(string=hai) anos
pai
achega
01940692c4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/src/util/newFile.ts

+ 1 - 1
app/src/util/newFile.ts

@@ -68,7 +68,7 @@ export const newFile = (notebookId?: string, currentPath?: string, paths?: strin
             } else {
                 fetchPost("/api/filetree/getHPathByPath", {
                     notebook: notebookId,
-                    path: currentPath
+                    path: currentPath.endsWith(".sy") ? currentPath : currentPath + ".sy"
                 }, (responseHPath) => {
                     fetchPost("/api/filetree/createDocWithMd", {
                         notebook: notebookId,