exit when no files were found
This commit is contained in:
parent
53f077adcb
commit
b86601cccb
1 changed files with 4 additions and 0 deletions
|
@ -24,6 +24,10 @@ func Transfer() {
|
||||||
transferSize = 0
|
transferSize = 0
|
||||||
sourcefiles := getSourceFiles()
|
sourcefiles := getSourceFiles()
|
||||||
sourcefilesCount := len(sourcefiles)
|
sourcefilesCount := len(sourcefiles)
|
||||||
|
if sourcefilesCount <= 0 {
|
||||||
|
log.Info("nothing to do - exiting...")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
var waitgroup sync.WaitGroup
|
var waitgroup sync.WaitGroup
|
||||||
waitgroup.Add(sourcefilesCount)
|
waitgroup.Add(sourcefilesCount)
|
||||||
barcontainer := mpb.New(
|
barcontainer := mpb.New(
|
||||||
|
|
Loading…
Reference in a new issue