summaryrefslogtreecommitdiff
path: root/cmd/goaes/commands/decrypt.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/goaes/commands/decrypt.go')
-rw-r--r--cmd/goaes/commands/decrypt.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/goaes/commands/decrypt.go b/cmd/goaes/commands/decrypt.go
index 1912c1a..a590f47 100644
--- a/cmd/goaes/commands/decrypt.go
+++ b/cmd/goaes/commands/decrypt.go
@@ -5,6 +5,7 @@ import (
"encoding/gob"
"log/slog"
"os"
+ "path/filepath"
"github.com/nerdsec/goaes/internal"
"github.com/urfave/cli/v3"
@@ -14,6 +15,7 @@ func Decrypt(ctx context.Context, cmd *cli.Command) error {
source := cmd.String("source")
destination := cmd.String("destination")
+ source = filepath.Clean(source)
file, err := os.Open(source)
if err != nil {
return err