Skip to content

Commit

Permalink
Merge pull request #37 from afbjorklund/filepath-windows
Browse files Browse the repository at this point in the history
Don't use filepath for remote paths only for local
  • Loading branch information
AkihiroSuda authored Jul 4, 2022
2 parents 788409c + ed312d5 commit be7ce41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/reversesshfs/reversesshfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"io"
"os"
"os/exec"
"path"
"path/filepath"
"runtime"
"strconv"
Expand Down Expand Up @@ -44,7 +45,7 @@ type ReverseSSHFS struct {
func (rsf *ReverseSSHFS) Prepare() error {
sshBinary := rsf.SSHConfig.Binary()
sshArgs := rsf.SSHConfig.Args()
if !filepath.IsAbs(rsf.RemotePath) {
if !path.IsAbs(rsf.RemotePath) {
return fmt.Errorf("unexpected relative path: %q", rsf.RemotePath)
}
if rsf.Port != 0 {
Expand Down Expand Up @@ -127,7 +128,7 @@ func (rsf *ReverseSSHFS) Start() error {
if !filepath.IsAbs(rsf.LocalPath) {
return fmt.Errorf("unexpected relative path: %q", rsf.LocalPath)
}
if !filepath.IsAbs(rsf.RemotePath) {
if !path.IsAbs(rsf.RemotePath) {
return fmt.Errorf("unexpected relative path: %q", rsf.RemotePath)
}
if rsf.Port != 0 {
Expand Down

0 comments on commit be7ce41

Please sign in to comment.