@@ -2336,16 +2336,17 @@ ;; NOTE: This is suboptimal as the testdata will be used later and the state/status may have changed ... (if (null? tal) (loop new-test-dat tal) (loop (car tal)(append tal (list new-test-dat))))) (begin - (set! lasttpath (db:test-get-rundir new-test-dat)) ;; remember this path for run removal - (if (file-exists? lasttpath) - (set! lastrealpath (resolve-pathname lasttpath)) - (set! lastrealpath lasttpath) + (if (and (not (string= (db:test-get-rundir new-test-dat) "/tmp/badname")) (file-exists? (db:test-get-rundir new-test-dat))) + (begin + (set! lasttpath (db:test-get-rundir new-test-dat)) ;; remember this path for run removal + (set! lastrealpath (resolve-pathname lasttpath)) + (runs:remove-test-directory new-test-dat mode) ;; 'remove-all) + ) ) - (runs:remove-test-directory new-test-dat mode) ;; 'remove-all) (if (not (null? tal)) (loop (car tal)(cdr tal))))))) (rmt:update-run-stats run-id (rmt:get-raw-run-stats run-id))) ((kill-runs) @@ -2420,10 +2421,11 @@ ;; remove the run if zero tests remain (if (eq? action 'remove-runs) (let* ((run-id (db:get-value-by-header run header "id")) ;; NB// masks run-id from above? (remtests (mt:get-tests-for-run run-id #f '("DELETED") '("n/a") not-in: #t))) (if (null? remtests) ;; no more tests remaining + ;; Remove the last dir from the path. ;; And same for the link-resolved path (let* ((dparts (string-split lasttpath "/")) (linkspath (conc "/" (string-intersperse (take dparts (- (length dparts) 1)) "/"))) (real-dparts (string-split lastrealpath "/"))