Once in a while I run into an issue where rar files won't get extracted due to a missing or invalid MIME header. The rar file will extract successfully using cmd line unrar however I had to comment out the below to successfully get this to run. I wasn't able to check the mime types of the invalid but valid rar files, however I'll check next time I run into this.
# check file really is a rar file if [[ ! "file --mime "${file}"`" =~ $MATCHRARMIME ]]; then
message error "Skipping file \"${file}\" because it does not appear to be a valid rar file."
Treat this as a failure so we exit with a non zero exit code
Once in a while I run into an issue where rar files won't get extracted due to a missing or invalid MIME header. The rar file will extract successfully using cmd line unrar however I had to comment out the below to successfully get this to run. I wasn't able to check the mime types of the invalid but valid rar files, however I'll check next time I run into this.
# check file really is a rar file if [[ ! "
file --mime "${file}"`" =~ $MATCHRARMIME ]]; then message error "Skipping file \"${file}\" because it does not appear to be a valid rar file."Treat this as a failure so we exit with a non zero exit code
fi `