Skip to content

Commit

Permalink
Workaround for Windows Subsystem for Linux bug
Browse files Browse the repository at this point in the history
On WSL, one user reported that they could not create an archive due to:

tarsnap: link(/root/tarsnap-cache/directory.tmp, /root/tarsnap-cache/directory): Permission denied

I believe [1] that this is due to a known WSL issue [2] which was marked
as fixed 2020-06-02, but that fix is currently only available for
"Insider Preview" builds and not public builds.  Also, I'm not certain
how often WSL users update their installed systems.

[1] http://mail.tarsnap.com/tarsnap-users/msg01601.html

[2] microsoft/WSL#3972
  • Loading branch information
gperciva committed Jan 20, 2022
1 parent ce9a08e commit 44676cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tar/chunks/chunks_directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ chunks_directory_commit(const char * cachepath, const char * osuff,

/* Create a link from ${cachedir}/directory.tmp. */
if (link(t, s)) {
if ((errno != ENOSYS) && (errno != EPERM)) {
if ((errno != ENOSYS) && (errno != EPERM) && (errno != EACCES)) {
warnp("link(%s, %s)", t, s);
goto err2;
}
Expand Down

0 comments on commit 44676cf

Please sign in to comment.