From ff07e9f69f57bf07512406494df528cec881982d Mon Sep 17 00:00:00 2001 From: Hector Ventura Date: Sat, 10 Oct 2026 17:52:17 -0500 Subject: [PATCH] refactor(start): keep bindSource's javadoc on the method --- src/main/java/io/floci/cli/commands/StartCommand.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/floci/cli/commands/StartCommand.java b/src/main/java/io/floci/cli/commands/StartCommand.java index d5f7d70..aaceb30 100644 --- a/src/main/java/io/floci/cli/commands/StartCommand.java +++ b/src/main/java/io/floci/cli/commands/StartCommand.java @@ -140,17 +140,17 @@ public class StartCommand implements Callable { return Path.of(persistDir).toAbsolutePath().normalize().toString(); } + // Absolute on the daemon's machine, whichever system that is: a leading slash, a drive + // letter with a separator, or a UNC share. + // Not decided by this machine's Path rules, which know only its own file system. + private static final Pattern REMOTE_ABSOLUTE = Pattern.compile("^(/|[A-Za-z]:[\\\\/]|\\\\\\\\)"); + /** * The bind source handed to a daemon reached through {@code daemon}. A remote daemon gets * {@code persistDir} exactly as given: the path names a directory on its machine, and * resolving it here would apply this machine's rules to it (a Windows CLI turns * {@code /srv/data} into a drive path). Only a local daemon gets {@link #persistPath()}. */ - // Absolute on the daemon's machine, whichever system that is: a leading slash, a drive - // letter with a separator, or a UNC share. - // Not decided by this machine's Path rules, which know only its own file system. - private static final Pattern REMOTE_ABSOLUTE = Pattern.compile("^(/|[A-Za-z]:[\\\\/]|\\\\\\\\)"); - public String bindSource(DockerClient.DockerHost daemon) { return daemon.kind() == DockerClient.Kind.TCP ? persistDir : persistPath(); }