Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Android preferences root path on Windows #558

Merged
merged 15 commits into from
Nov 26, 2020
Prev Previous commit
Next Next commit
Simplify dirExists
  • Loading branch information
jpkleemans committed Nov 25, 2020
commit c6bbcba7ba6727e69a41e72c113c5eb961ca3ef9
16 changes: 3 additions & 13 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -871,19 +871,9 @@ async function getAndroidPrefsRoot () {
}

async function dirExists (location) {
if (!location) {
return false;
}

if (!await fs.exists(location)) {
return false;
}

if (!(await fs.stat(location)).isDirectory()) {
return false;
}

return true;
return location
&& await fs.exists(location)
&& (await fs.stat(location)).isDirectory();
}

export {
Expand Down