Skip to content

Commit 36bd51f

Browse files
[Bugfix:Plagiarism] Clean up temp files on failure (#52)
* Clean up files on failure * Don't try to delete file which has already been deleted Co-authored-by: sbelsk <[email protected]>
1 parent c5e0c9d commit 36bd51f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/process_all.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ mkdir -p "${basepath}/users"
7171

7272
############################################################################
7373
# Run Lichen
74-
./tokenize_all.py "$tmp_location" || exit 1
75-
./hash_all.py "$tmp_location" || exit 1
76-
./compare_hashes.out "$tmp_location" || exit 1
74+
./tokenize_all.py "$tmp_location" || { rm -rf $tmp_location; exit 1; }
75+
./hash_all.py "$tmp_location" || { rm -rf $tmp_location; exit 1; }
76+
./compare_hashes.out "$tmp_location" || { rm -rf $tmp_location; exit 1; }
7777

7878
############################################################################
7979
# Zip the results back up and send them back to the course's lichen directory

0 commit comments

Comments
 (0)