Skip to content

Commit

Permalink
Fixes for IndexFeatureFile error reporting. (#6367)
Browse files Browse the repository at this point in the history
* Don't call toAbsolutePath on our Paths since it resolves paths that are not already absolute to a (implementation dependent) default location, which will often return an incorrect result for non-default file systems.
* Cosmetic improvement to the error reported in #6348
  • Loading branch information
cmnbroad authored and lbergelson committed Jan 27, 2020
1 parent a351389 commit b5cbaac
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ protected Object doWork() {
try {
index.write(indexPath);
} catch (final IOException e) {
throw new UserException.CouldNotCreateOutputFile("Could not write index to file " + indexPath.toAbsolutePath(), e);
throw new UserException.CouldNotCreateOutputFile("Could not write index to file " + indexPath, e);
}

logger.info("Successfully wrote index to " + indexPath.toAbsolutePath());
return indexPath.toAbsolutePath().toString();
logger.info("Successfully wrote index to " + indexPath);
return indexPath.toString();
}

private Path determineFileName(final Index index) {
Expand Down

0 comments on commit b5cbaac

Please sign in to comment.