Fix status code output in get function

This commit is contained in:
Shivam Mathur 2024-11-12 02:20:20 +05:30
parent 80075aeba5
commit a75ffb672b
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -86,12 +86,10 @@ get() {
else
lock_path="$file_path.lock"
until sudo mkdir "$lock_path" 2>/dev/null; do
echo "Another process is downloading a file at $file_path, waiting"
sleep 1
done
if [ "$execute" = "-e" ]; then
until [ -z "$(fuser "$file_path" 2>/dev/null)" ]; do
echo "Waiting for other processes to stop using $file_path..."
sleep 1
done
fi