aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2025-04-20 08:12:59 -0700
committerRose Hogenson <rosehogenson@posteo.net>2025-04-20 08:12:59 -0700
commit2048a8ed6b6457977242267ff700e4859176dad4 (patch)
tree983e210319b54d8aeae6545ceec6e42b56b7bc50
parent9159eca507577b05c2b6124ecbc51d4720e64c96 (diff)
downloadtrash-2048a8ed6b6457977242267ff700e4859176dad4.tar.zst
Use PathEscape instead of QueryEscape
-rw-r--r--trash.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/trash.go b/trash.go
index 37a48ab..f6e51b4 100644
--- a/trash.go
+++ b/trash.go
@@ -92,7 +92,7 @@ func writeTrashInfo(fileName, trash, now string) (_ string, err error) {
}()
escapedPath := strings.Split(absPath, string(filepath.Separator))
for i, pathSegment := range escapedPath {
- escapedPath[i] = url.QueryEscape(pathSegment)
+ escapedPath[i] = url.PathEscape(pathSegment)
}
_, err = fmt.Fprintf(info, `[Trash Info]
Path=%s