Skip to content

Commit e3b3dad

Browse files
committed
clean our passPath for good measure
1 parent 14bdf17 commit e3b3dad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func main() {
200200
log.Fatalln(err)
201201
}
202202

203-
f, err := os.OpenFile(passPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600)
203+
f, err := os.OpenFile(filepath.Clean(passPath), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600)
204204
if err != nil {
205205
log.Fatalln(err)
206206
}
@@ -231,7 +231,7 @@ func main() {
231231
os.Exit(1)
232232
}
233233
} else {
234-
p, err := os.Open(passPath)
234+
p, err := os.Open(filepath.Clean(passPath))
235235
if err != nil {
236236
log.Fatal(err)
237237
}

0 commit comments

Comments
 (0)