protonscr

Symlinks in download directory causing download failure

steamopen Feature RequestreviewedSteam client
ValveSoftware/steam-for-linux#3363 · opened 2014-06-19 by NotMrFlibble · updated 2014-06-30 · 0 comments · github
NNotMrFlibble 2014-06-19 github

I've just found out why I was having problems downloading “Thinking with Time Machine”. There were symlinks in the download directory (which look correct, at least for their final location), but the client was trying to open them and was failing.

Unfortunately, the client just reports “disk write error”. This is rather unhelpful, not to mention misleading – my first response to that is to check the kernel log. Better to show the result of strerror(errno).

So I applied strace to the problem and found the open() failure – it's trying to open for writing, with options for creating or truncating as necessary, but it can't because of the broken symlink; so open() returns -1, first setting errno to ENOENT.

Since removing the symlinks allows download to be completed, I think that it makes most sense to unlink the file and retry (once) should that error occur.

Nothing extracted yet.