Fixup volume management

Fixes related to removing directory and directory perms
This commit is contained in:
Girish Ramakrishnan
2019-01-18 14:48:31 -08:00
parent fcc77635c2
commit 38a4c1aede
8 changed files with 28 additions and 17 deletions

View File

@@ -175,6 +175,7 @@ function deleteAppDir(app, options, callback) {
if (!entries) return callback(`Error listing ${resolvedAppDataDir}: ${safe.error.message}`);
// remove only files. directories inside app dir are currently volumes managed by the addons
// we cannot delete those dirs anyway because of perms
entries.forEach(function (entry) {
let stat = safe.fs.statSync(path.join(resolvedAppDataDir, entry));
if (stat && !stat.isDirectory()) safe.fs.unlinkSync(path.join(resolvedAppDataDir, entry));