diff --git a/main.js b/main.js index ee4b6ab..988701c 100644 --- a/main.js +++ b/main.js @@ -856,6 +856,9 @@ app.whenReady().then(() => { }); // Diff ipcMain.handle('diff-commit', async (_e, folderObj, hash) => { + if (folderObj.needsRelocation || !fs.existsSync(folderObj.path)) { + return; + } const git = simpleGit(folderObj.path); return git.diff([`${hash}^!`]); });