Skip to content

Commit

Permalink
fixes #36
Browse files Browse the repository at this point in the history
  • Loading branch information
tobihagemann committed May 24, 2019
1 parent bad124b commit 160f54b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;

class LinuxMounter implements Mounter {

Expand Down Expand Up @@ -40,9 +39,9 @@ private LinuxMount(Path directory, EnvironmentVariables envVars) {
Path mountPoint = envVars.getMountPath();
String[] command = envVars.getRevealCommand().orElse(DEFAULT_REVEALCOMMAND_LINUX).split("\\s+");
this.revealCommand = new ProcessBuilder(ObjectArrays.concat(command, mountPoint.toString()));
this.unmountCommand = new ProcessBuilder("fusermount", "-u", mountPoint.getFileName().toString());
this.unmountCommand = new ProcessBuilder("fusermount", "-u", "--", mountPoint.getFileName().toString());
this.unmountCommand.directory(mountPoint.getParent().toFile());
this.unmountForcedCommand = new ProcessBuilder("fusermount", "-u", "-z", mountPoint.getFileName().toString());
this.unmountForcedCommand = new ProcessBuilder("fusermount", "-u", "-z", "--", mountPoint.getFileName().toString());
this.unmountForcedCommand.directory(mountPoint.getParent().toFile());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;

class MacMounter implements Mounter {

Expand Down Expand Up @@ -99,9 +98,9 @@ private MacMount(Path directory, EnvironmentVariables envVars) {
Path mountPoint = envVars.getMountPath();
this.revealCommand = new ProcessBuilder("open", ".");
this.revealCommand.directory(mountPoint.toFile());
this.unmountCommand = new ProcessBuilder("umount", mountPoint.getFileName().toString());
this.unmountCommand = new ProcessBuilder("umount", "--", mountPoint.getFileName().toString());
this.unmountCommand.directory(mountPoint.getParent().toFile());
this.unmountForcedCommand = new ProcessBuilder("umount", "-f", mountPoint.getFileName().toString());
this.unmountForcedCommand = new ProcessBuilder("umount", "-f", "--", mountPoint.getFileName().toString());
this.unmountForcedCommand.directory(mountPoint.getParent().toFile());
}

Expand Down

0 comments on commit 160f54b

Please sign in to comment.