exit when no files were found

This commit is contained in:
Daniel Sommer 2023-09-22 10:58:33 +02:00
parent 53f077adcb
commit b86601cccb

View file

@ -24,6 +24,10 @@ func Transfer() {
transferSize = 0
sourcefiles := getSourceFiles()
sourcefilesCount := len(sourcefiles)
if sourcefilesCount <= 0 {
log.Info("nothing to do - exiting...")
os.Exit(0)
}
var waitgroup sync.WaitGroup
waitgroup.Add(sourcefilesCount)
barcontainer := mpb.New(