Make fproc more reliable (fool-proof).
For some reason I have found empty files showing up in cache dirs, this should at least clean them up.
This commit is contained in:
parent
bd54b147f1
commit
4d36a9a57d
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ score=`{{tee $tmpfile || exit 1} | sha1sum}
|
|||
cachedir=/tmp/fproc_cache/$score
|
||||
mkdir -p $cachedir >[2]/dev/null
|
||||
|
||||
if(test -f $cachedir/$proc)
|
||||
if(test -s $cachedir/$proc)
|
||||
cat $cachedir/$proc
|
||||
if not {
|
||||
$proc < $tmpfile | tee $cachedir/$pid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue