Skip to content

Commit

Permalink
Update FileUtils.java with improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes authored Jan 12, 2024
1 parent 5d8d898 commit 6aa7034
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public static FileSystemProvider getFileSystemProvider(String scheme) {
.installedProviders()
.stream()
.filter(provider -> provider.getScheme().equalsIgnoreCase(scheme))
.peek(provider -> log.debug("Found {} file system provider {}", scheme, provider))
.findFirst()
.orElseThrow(() -> new FileSystemNotFoundException(
"No file system provider for " + scheme + " was found"
Expand All @@ -77,6 +78,7 @@ public static FileSystemProvider getFileSystemProvider(String scheme) {

public static void makeExecutable(Path file) throws IOException {
try {
log.debug("Ensuring {} is executable", file);
var perms = new HashSet<>(Files.getPosixFilePermissions(file));
perms.add(PosixFilePermission.OWNER_EXECUTE);
Files.setPosixFilePermissions(file, perms);
Expand Down

0 comments on commit 6aa7034

Please sign in to comment.