Skip to content

Commit

Permalink
Use fusermount3 instead of fusermount to unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Feb 1, 2023
1 parent 6441c20 commit 9f83db2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ public LinuxFuseMountedVolume(Fuse fuse, FuseNioAdapter fuseNioAdapter, Path mou

@Override
public void unmount() throws UnmountFailedException {
ProcessBuilder command = new ProcessBuilder("fusermount", "-u", "--", mountpoint.getFileName().toString());
ProcessBuilder command = new ProcessBuilder("fusermount3", "-u", "--", mountpoint.getFileName().toString());
command.directory(mountpoint.getParent().toFile());
try {
Process p = command.start();
ProcessHelper.waitForSuccess(p, 10, "`fusermount -u`");
ProcessHelper.waitForSuccess(p, 10, "`fusermount3 -u`");
fuse.close();
unmounted = true;
} catch (InterruptedException e) {
Expand All @@ -141,7 +141,7 @@ public void unmount() throws UnmountFailedException {
if (e.stderr.contains(String.format("not mounted", mountpoint)) || e.stderr.contains(String.format("entry for %s not found in", mountpoint))) {
LOG.info("{} already unmounted. Nothing to do.", mountpoint);
} else {
LOG.warn("{} failed with exit code {}:\nSTDOUT: {}\nSTDERR: {}\n", "`fusermount -u`", e.exitCode, e.stdout, e.stderr);
LOG.warn("{} failed with exit code {}:\nSTDOUT: {}\nSTDERR: {}\n", "`fusermount3 -u`", e.exitCode, e.stdout, e.stderr);
throw new UnmountFailedException(e);
}
}
Expand Down

0 comments on commit 9f83db2

Please sign in to comment.