mirror of
https://github.com/dracutdevs/dracut.git
synced 2024-10-27 00:55:34 +03:00
url-lib: fix fetch_url return value for dotfiles
If you do "fetch_url $url/.somefile", fetch_url would return failure, because "$outdir/*" wouldn't match the file. Use ls -A (which busybox ls supports) to actually find possible dotfiles in the created output dir. Signed-off-by: Will Woods <wwoods@redhat.com>
This commit is contained in:
parent
cd9592385d
commit
ed293f6d0c
@ -60,11 +60,8 @@ curl_fetch_url() {
|
||||
curl $curl_args --output "$outloc" "$url" || return $?
|
||||
else
|
||||
local outdir="$(mkuniqdir /tmp curl_fetch_url)"
|
||||
local cwd="$(pwd)"
|
||||
cd "$outdir"
|
||||
curl $curl_args --remote-name "$url" || return $?
|
||||
cd "$cwd"
|
||||
outloc="$(echo $outdir/*)"
|
||||
( cd "$outdir"; curl $curl_args --remote-name "$url" || return $? )
|
||||
outloc="$outdir/$(ls -A $outdir)"
|
||||
fi
|
||||
[ -f "$outloc" ] || return 253
|
||||
echo "$outloc"
|
||||
|
Loading…
Reference in New Issue
Block a user