]> Sergey Matveev's repositories - meta4ra.git/commitdiff
Normalize path
authorSergey Matveev <stargrave@stargrave.org>
Thu, 13 Apr 2023 18:59:42 +0000 (21:59 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 13 Apr 2023 18:59:42 +0000 (21:59 +0300)
cmd/meta4-create/main.go

index ea0a776086014ce50817dc0431742e4e1b8ee942..f14ed7ce2ca17b7b07a8a4842cdcbd00bd19b2c9 100644 (file)
@@ -29,6 +29,7 @@ import (
        "io"
        "log"
        "os"
+       "path"
        "sync"
        "time"
 
@@ -107,7 +108,7 @@ func main() {
                log.Fatalln(err)
        }
        f := meta4ra.File{
-               Name:        *fn,
+               Name:        path.Base(*fn),
                Description: *desc,
                Size:        uint64(size),
                URLs:        urls,