implement check for missing locations
This commit is contained in:
@@ -212,7 +212,20 @@ method view(list: RoutineListState): Widget {.locks: "unknown".} =
|
||||
xAlign = 0
|
||||
useMarkup = true
|
||||
proc clicked() =
|
||||
createThread(thread, rsyncThread, list)
|
||||
#check that every source and destination exists for each routine or don't run bkup and show dialog.
|
||||
#locations not found will be logged. see shared.nim
|
||||
var allLocationsExist: seq[bool]
|
||||
for routine in list.routineModel.routineSeq():
|
||||
if routine.id in list.selected:
|
||||
if locationsExist(routine) == true:
|
||||
allLocationsExist.add(true)
|
||||
else:
|
||||
allLocationsExist.add(false)
|
||||
if false in allLocationsExist:
|
||||
#show error status.
|
||||
list.runStatus = "<span color=\"#ff6b6b\" size=\"large\">Missing Source(s)/Destination(s) in selected Routine(s).</span>"
|
||||
else:
|
||||
createThread(thread, rsyncThread, list)
|
||||
else:
|
||||
Box {.expand: false.}:
|
||||
orient = OrientY
|
||||
|
||||
Reference in New Issue
Block a user