Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ download_hf_file() {
# Acquire slot for parallel download limiting
local slot=$(acquire_slot)

# Ensure the lockfile's parent directory exists; otherwise mkdir below
# fails with ENOENT and the while-loop silently misreports as "lock
# held by another process", causing an infinite wait.
mkdir -p "$(dirname "$output_path")"

# Acquire lock for this specific file
while ! mkdir "$lockfile" 2>/dev/null; do
echo "Another process is downloading to $output_path (waiting...)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ download_hf_file() {
# Acquire slot for parallel download limiting
local slot=$(acquire_slot)

# Ensure the lockfile's parent directory exists; otherwise mkdir below
# fails with ENOENT and the while-loop silently misreports as "lock
# held by another process", causing an infinite wait.
mkdir -p "$(dirname "$output_path")"

# Acquire lock for this specific file
while ! mkdir "$lockfile" 2>/dev/null; do
echo "Another process is downloading to $output_path (waiting...)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ download_hf_file() {
# Acquire slot for parallel download limiting
local slot=$(acquire_slot)

# Ensure the lockfile's parent directory exists; otherwise mkdir below
# fails with ENOENT and the while-loop silently misreports as "lock
# held by another process", causing an infinite wait.
mkdir -p "$(dirname "$output_path")"

# Acquire lock for this specific file
while ! mkdir "$lockfile" 2>/dev/null; do
echo "Another process is downloading to $output_path (waiting...)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ download_hf_file() {
# Acquire slot for parallel download limiting
local slot=$(acquire_slot)

# Ensure the lockfile's parent directory exists; otherwise mkdir below
# fails with ENOENT and the while-loop silently misreports as "lock
# held by another process", causing an infinite wait.
mkdir -p "$(dirname "$output_path")"

# Acquire lock for this specific file
while ! mkdir "$lockfile" 2>/dev/null; do
echo "Another process is downloading to $output_path (waiting...)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ download_hf_file() {
# Acquire slot for parallel download limiting
local slot=$(acquire_slot)

# Ensure the lockfile's parent directory exists; otherwise mkdir below
# fails with ENOENT and the while-loop silently misreports as "lock
# held by another process", causing an infinite wait.
mkdir -p "$(dirname "$output_path")"

# Acquire lock for this specific file
while ! mkdir "$lockfile" 2>/dev/null; do
echo "Another process is downloading to $output_path (waiting...)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ download_hf_file() {
# Acquire slot for parallel download limiting
local slot=$(acquire_slot)

# Ensure the lockfile's parent directory exists; otherwise mkdir below
# fails with ENOENT and the while-loop silently misreports as "lock
# held by another process", causing an infinite wait.
mkdir -p "$(dirname "$output_path")"

# Acquire lock for this specific file
while ! mkdir "$lockfile" 2>/dev/null; do
echo "Another process is downloading to $output_path (waiting...)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ download_hf_file() {
# Acquire slot for parallel download limiting
local slot=$(acquire_slot)

# Ensure the lockfile's parent directory exists; otherwise mkdir below
# fails with ENOENT and the while-loop silently misreports as "lock
# held by another process", causing an infinite wait.
mkdir -p "$(dirname "$output_path")"

# Acquire lock for this specific file
while ! mkdir "$lockfile" 2>/dev/null; do
echo "Another process is downloading to $output_path (waiting...)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ download_hf_file() {
# Acquire slot for parallel download limiting
local slot=$(acquire_slot)

# Ensure the lockfile's parent directory exists; otherwise mkdir below
# fails with ENOENT and the while-loop silently misreports as "lock
# held by another process", causing an infinite wait.
mkdir -p "$(dirname "$output_path")"

# Acquire lock for this specific file
while ! mkdir "$lockfile" 2>/dev/null; do
echo "Another process is downloading to $output_path (waiting...)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ download_hf_file() {
# Acquire slot for parallel download limiting
local slot=$(acquire_slot)

# Ensure the lockfile's parent directory exists; otherwise mkdir below
# fails with ENOENT and the while-loop silently misreports as "lock
# held by another process", causing an infinite wait.
mkdir -p "$(dirname "$output_path")"

# Acquire lock for this specific file
while ! mkdir "$lockfile" 2>/dev/null; do
echo "Another process is downloading to $output_path (waiting...)"
Expand Down