forked from github/cordova-android
CB-10660 fixed the exception when removing a non-existing directory. This closes #261
This commit is contained in:
committed by
Vladimir Kotikov
parent
757a3685f2
commit
0a1b71f125
+1
-1
@@ -96,7 +96,7 @@ var handlers = {
|
||||
subDir = path.resolve(project.projectDir, subRelativeDir);
|
||||
// If it's the last framework in the plugin, remove the parent directory.
|
||||
var parDir = path.dirname(subDir);
|
||||
if (fs.readdirSync(parDir).length === 0) {
|
||||
if (fs.existsSync(parDir) && fs.readdirSync(parDir).length === 0) {
|
||||
fs.rmdirSync(parDir);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user