1
0
Fork 0
mirror of https://github.com/Luzifer/share.git synced 2024-12-20 18:41:17 +00:00

Fix: Change had side-effects

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2017-12-28 17:04:05 +01:00
parent 6ba64acf02
commit 3dd75b7493
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -81,8 +81,10 @@ func main() {
} }
func calculateUploadFilename(inFile string) (string, error) { func calculateUploadFilename(inFile string) (string, error) {
inFile = strings.Replace(inFile, " ", "_", -1) upFile := path.Join(
upFile := path.Join(cfg.BasePath, path.Base(inFile)) cfg.BasePath,
strings.Replace(path.Base(inFile), " ", "_", -1),
)
fileHash, err := hashFile(inFile) fileHash, err := hashFile(inFile)
if err != nil { if err != nil {