Skip to content

Commit

Permalink
Filenames with spaces should have quotes around them
Browse files Browse the repository at this point in the history
  • Loading branch information
quackduck committed Feb 15, 2021
1 parent 7678d14 commit 5ab34b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rem.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func trashFile(path string) {
toMoveTo = trashDir + "/" + filepath.Base(path) + " Deleted at " + time.Now().Format(time.StampNano)
fmt.Println("You are a god.")
case 4:
rand.Seed(time.Now().UTC().UnixNano()) // prep for default
rand.Seed(time.Now().UTC().UnixNano()) // prep for default case
default: // nano-freaking-seconds aren't enough for this guy
fmt.Println("(speechless)")
if i == 4 { // seed once
Expand All @@ -233,9 +233,9 @@ func trashFile(path string) {
if i != 1 {
fmt.Println("A file of this exact path was deleted earlier. To avoid conflicts, this file will now be called " + color.YellowString(path))
}
m[path] = toMoveTo // logfile format is path where it came from ==> path in trash
m[path] = toMoveTo // format is path where it came from ==> path in trash
setLogFile(m)
fmt.Println("Trashed " + color.YellowString(path) + "\nUndo using " + color.YellowString("rem --undo "+path))
fmt.Println("Trashed " + color.YellowString(path) + "\nUndo using " + color.YellowString("rem --undo \""+path+"\""))
}

func exists(path string) bool {
Expand Down

0 comments on commit 5ab34b0

Please sign in to comment.