summaryrefslogtreecommitdiffstats
path: root/krops.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krops.nix')
-rw-r--r--krops.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/krops.nix b/krops.nix
index 88f8eee8..aa4e511d 100644
--- a/krops.nix
+++ b/krops.nix
@@ -203,9 +203,15 @@ rec {
forgetPending = /* sh */ ''
trap 'rm -fR ${pending}' EXIT
'';
+ # Copied under a dot name, which enstate skips, and renamed: from memory
+ # to disk, mv would copy, and enstate could see half a submission.
movePending = /* sh */ ''
mkdir -p -m 0700 ${stateDir} ${stateDir}/incoming
- find ${pending} -mindepth 1 -maxdepth 1 -exec mv -t ${stateDir}/incoming {} +
+ find ${pending} -mindepth 1 -maxdepth 1 -printf '%f\n' |
+ while read -r submission; do
+ cp -a ${pending}/"$submission" ${stateDir}/incoming/."$submission"
+ mv ${stateDir}/incoming/."$submission" ${stateDir}/incoming/"$submission"
+ done
'';
};