mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
CB-10660 fixed the exception when removing a non-existing directory. This closes #261
This commit is contained in:
parent
757a3685f2
commit
0a1b71f125
2
bin/templates/cordova/lib/pluginHandlers.js
vendored
2
bin/templates/cordova/lib/pluginHandlers.js
vendored
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user