Open
Description
Zig Version
0.14.0
Steps to Reproduce and Observed Behavior
Discovered when trying to figure out why one could not run:
zig fetch https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.8.2407/linux_dxc_2024_07_31.x86_64.tar.gz
Is was returning the error:
error: unable to rename temporary directory '~/.cache/zig/tmp/53571228b81b7e97' into package cache directory '~/.cache/zig/p/N-V-__8AAH2XGgKqo-yDbpTxRrXI5AYuCxdb_Ni7QOWeQTVZ': FileBusy
So I thought to figure out what's wrong with the tarbal that Zig can't seem to handle. When running tar -vtf
on the file, I noticed all of the file paths contain the ./
prefix. To make sure this was the case, I created a test package, and ran a local http server.
$ tar -czf archive.tar.gz test-package/
$ tar -vtf archive.tar.gz
drwxr-xr-x jeremia/jeremia 0 2025-03-08 18:37 test-package/
-rw-r--r-- jeremia/jeremia 16 2025-03-08 18:37 test-package/README.md
$ zig fetch http://localhost:8000/archive.tar.gz
N-V-__8AABAAAAAtCjsC7HRmOePNKF3sNsz72cJJcqmOKQ9z
$ tar -czf archive.tar.gz ./test-package/
$ tar -vtf archive.tar.gz
drwxr-xr-x jeremia/jeremia 0 2025-03-08 18:37 ./test-package/
-rw-r--r-- jeremia/jeremia 16 2025-03-08 18:37 ./test-package/README.md
$ zig fetch http://localhost:8000/archive.tar.gz
error: unable to rename temporary directory '/home/jeremia/.cache/zig/tmp/b320d5ba7b7de384' into package cache directory '/home/jeremia/.cache/zig/p/N-V-__8AABAAAABxCaA3CyssWe86Ow1EtjeUO7PNWcNonp79': FileBusy
Expected Behavior
For the tarball to be extracted and moved properly regardless of the "current directory" prefix.