import: avoid ugly padding = at the end of base32 pathname
This commit is contained in:
parent
21590655cb
commit
9325419002
@ -89,7 +89,7 @@ func importFile(uf uploadedFile, next func(string, string, []byte) (interface{},
|
||||
return nil, errors.New("URI or path not filled")
|
||||
}
|
||||
|
||||
pathname := path.Join(fic.FilesDir, strings.ToLower(base32.StdEncoding.EncodeToString(hash[:])), path.Base(fromURI))
|
||||
pathname := path.Join(fic.FilesDir, strings.ToLower(base32.StdEncoding.WithPadding(0).EncodeToString(hash[:])), path.Base(fromURI))
|
||||
|
||||
// Remove the file if it exists
|
||||
// TODO: check if this is symlink => remove to avoid File not found error after, because the file is writen at the adresse pointed.
|
||||
|
Loading…
Reference in New Issue
Block a user