Skip to content

Commit

Permalink
Attempt to fix bootstrap installation failure that may be caused by i…
Browse files Browse the repository at this point in the history
…nvalid mkdirs return value
  • Loading branch information
agnostic-apollo committed Jul 8, 2021
1 parent c6b4114 commit dc8bdfe
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,10 @@ public static Error validateDirectoryFileExistenceAndPermissions(String label, f
if (createDirectoryIfMissing && fileType == FileType.NO_EXIST) {
Logger.logVerbose(LOG_TAG, "Creating " + label + "directory file at path \"" + filePath + "\"");
// Create directory and update fileType if successful, otherwise return with error
if (file.mkdirs())
fileType = getFileType(filePath, false);
else
// It "might" be possible that mkdirs returns false even though directory was created
boolean result = file.mkdirs();
fileType = getFileType(filePath, false);
if (!result && fileType != FileType.DIRECTORY)
return FileUtilsErrno.ERRNO_CREATING_FILE_FAILED.getError(label + "directory file", filePath);
}

Expand Down

0 comments on commit dc8bdfe

Please sign in to comment.