correctly do relative paths in windows

This commit is contained in:
Zack Scholl 2018-06-26 07:48:11 -07:00
parent 6d7911ab24
commit fa522c3e54
1 changed files with 1 additions and 3 deletions

View File

@ -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