locking file name is now always md5 hash

This commit is contained in:
louwrentius 2012-01-29 22:04:40 +00:00
parent a33f87d0b0
commit 8fe6ca64db

5
ppss
View File

@ -1722,12 +1722,7 @@ lock_item () {
else else
ITEM="$1" ITEM="$1"
if [[ "$USE_MD5" == "1" ]]
then
LOCK_FILE_NAME=$(echo "$ITEM" | $MD5 | awk '{ print $1 }') LOCK_FILE_NAME=$(echo "$ITEM" | $MD5 | awk '{ print $1 }')
else
LOCK_FILE_NAME=$(echo "$ITEM" | sed s/[^[:alnum:]]/_/g)
fi
ITEM_LOCK_FILE="$ITEM_LOCK_DIR/$LOCK_FILE_NAME" ITEM_LOCK_FILE="$ITEM_LOCK_DIR/$LOCK_FILE_NAME"
log DEBUG "Locking item $ITEM_LOCK_FILE" log DEBUG "Locking item $ITEM_LOCK_FILE"
exec_cmd "mkdir $ITEM_LOCK_FILE >> /dev/null 2>&1" exec_cmd "mkdir $ITEM_LOCK_FILE >> /dev/null 2>&1"