mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 05:09:56 +08:00
fix async exists call (#2490)
`The file already exists` always pop up even that file doesn't exist.
This commit is contained in:
parent
572ed9ee86
commit
186cc61f48
@ -357,7 +357,7 @@ ipcMain.on('mt::rename', async (e, { id, pathname, newPathname }) => {
|
||||
})
|
||||
}
|
||||
|
||||
if (!exists(newPathname)) {
|
||||
if (!await exists(newPathname)) {
|
||||
doRename()
|
||||
} else {
|
||||
const { response } = await dialog.showMessageBox(win, {
|
||||
|
Loading…
Reference in New Issue
Block a user