diff --git a/Makefile b/Makefile index 1d17cf1..4f09e2b 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ DIST := \ mtmediasrv.conf PROJECT := mtmediasrv -VERSION = 4 +VERSION = 5 BUILD = `git describe --tags --always` $(PROJECT): main.go diff --git a/main.go b/main.go index ba96533..47e40fd 100644 --- a/main.go +++ b/main.go @@ -180,9 +180,13 @@ func collectMedia(l bool, c bool, e map[string]bool, w string) filepath.WalkFunc if l { err := os.Link(path, of) if err != nil { - return err + if err != os.ErrExist { + return err + } + } + if err != os.ErrExist { + newmedia++ } - newmedia++ } else if c { in, err := os.Open(path) if err != nil {