Skip to content

Commit

Permalink
Fixed issue where undeploying with link mode would fail when original…
Browse files Browse the repository at this point in the history
… directories are restored.
  • Loading branch information
lVlyke committed Jul 26, 2024
1 parent fbd6bbb commit 6de145f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,8 @@ class ElectronLoader {
const backupDest = path.join(path.dirname(extFilesBackupDir), backupFile);

// Use hardlinks for faster file restoration in link mode
if (profile.linkMode) {
if (profile.linkMode && !fs.lstatSync(backupSrc).isDirectory()) {
// TODO - Recursively do this when encountering directories
return fs.link(backupSrc, backupDest);
} else {
return fs.copy(backupSrc, backupDest);
Expand Down

0 comments on commit 6de145f

Please sign in to comment.