mirror of https://github.com/schollz/croc.git
correctly do relative paths in windows
This commit is contained in:
parent
6d7911ab24
commit
fa522c3e54
|
@ -163,11 +163,9 @@ func NewConnection(config *AppConfig) (*Connection, error) {
|
|||
c.File.IsDir = true
|
||||
c.spinner.Stop()
|
||||
}
|
||||
c.File.Name = path.Base(config.File)
|
||||
c.File.Path = path.Dir(config.File)
|
||||
c.File.Path, c.File.Name = path.Split(filepath.ToSlash(config.File))
|
||||
c.File.Size, _ = FileSize(config.File)
|
||||
c.IsSender = true
|
||||
log.Debugf("file: %+v", c.File)
|
||||
} else {
|
||||
c.IsSender = false
|
||||
c.AskPath = config.PathSpec
|
||||
|
|
Loading…
Reference in New Issue