mirror of
https://github.com/Luzifer/share.git
synced 2024-12-29 23:11:18 +00:00
Fix: Change had side-effects
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
6ba64acf02
commit
3dd75b7493
1 changed files with 4 additions and 2 deletions
6
main.go
6
main.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue