gnu-koryavov icon indicating copy to clipboard operation
gnu-koryavov copied to clipboard

[Bug] OSX stat error on temp file deletion

Open nerett opened this issue 2 years ago • 0 comments

Description

An error occurs when trying to execute this code on OSX

filesize=$(stat --format="%s" /tmp/gnu-koryavov/${sem}-${zad}.tmp)
if [[ $filesize -eq 0 ]]; then

    rm /tmp/gnu-koryavov/${sem}-${zad}.tmp
    
fi

This code was added in #4 with the following purpose: the script creates an empty file when executed without internet connection that in fact leads to the situation when the problem solution actually exists in Koryavnik, but it's not provided by the script when connection is available again.

nerett avatar Apr 10 '22 18:04 nerett