Skip to content

Commit

Permalink
better directory handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mrctms committed Jan 5, 2021
1 parent 243c6cc commit e68ad74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"log"
"os"
"os/user"
"path"
"path/filepath"

"github.com/marcsauter/single"
Expand Down Expand Up @@ -47,6 +48,11 @@ func main() {
defer s.TryUnlock()
}

cleanPath, err := filepath.Abs(path.Clean(*dir))
if err != nil {
log.Fatalln(err)
}

var client clients.Clienter
sender, err := senders.NewTcpSender(*address)
if err != nil {
Expand All @@ -58,7 +64,7 @@ func main() {
}

client.SetSender(sender)
client.Run(*dir)
client.Run(cleanPath)
}

}

0 comments on commit e68ad74

Please sign in to comment.