Skip to content

Commit

Permalink
Adding error checking when we can resolve the absolute path when down…
Browse files Browse the repository at this point in the history
…loading
  • Loading branch information
RafBishopFox committed Apr 28, 2022
1 parent 708608c commit cb11ca6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/command/filesystem/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ func DownloadCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
dst = "loot"
} else {
// If this download is not being looted, make sure the local path exists
dst, _ := filepath.Abs(localPath)
dst, err := filepath.Abs(localPath)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
fi, err := os.Stat(dst)
if err != nil && !os.IsNotExist(err) {
con.PrintErrorf("%s\n", err)
Expand Down

0 comments on commit cb11ca6

Please sign in to comment.