From c998770a88ea6e4889a4caf949dce7b69697c35e Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 16 Dec 2017 19:39:56 +0100 Subject: [PATCH] use find instead of ls to get list of order files. this addresses the problem leading to bug 2394. Conflicts: process/create-orders --- process/create-orders | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/process/create-orders b/process/create-orders index b0ca292f4..b1b738d50 100755 --- a/process/create-orders +++ b/process/create-orders @@ -16,13 +16,15 @@ else mv orders.dir orders.dir.$TURN mkdir -p orders.dir fi -ls -1rt orders.dir.$TURN/turn-* | xargs cat > orders.$TURN +find "orders.dir.$TURN" -maxdepth 1 -type f -printf "%T+\t%p\n" | sort | cut -f2 | while read +do + cat "$REPLY" >> "orders.$TURN" +done lockfile -r3 -l120 orders.queue.lock if [ -e orders.queue ] ; then - mv orders.queue orders.dir.$TURN/orders.queue + mv orders.queue "orders.dir.$TURN/orders.queue" fi rm -f orders.queue.lock -fi