Update buildTrayMenu to check for .git directory
This commit is contained in:
3
main.js
3
main.js
@@ -1864,6 +1864,9 @@ function buildTrayMenu() {
|
||||
if (folderObj.needsRelocation || !fs.existsSync(folderObj.path)) {
|
||||
return false;
|
||||
}
|
||||
if (!fs.existsSync(path.join(folderObj.path, '.git'))) {
|
||||
return false;
|
||||
}
|
||||
const git = simpleGit(folderObj.path);
|
||||
const status = await git.status();
|
||||
return status.files.length > 0;
|
||||
|
||||
Reference in New Issue
Block a user