Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to download online content when ~/.local/share does not exist #6399

Open
DorpsGek opened this issue Dec 7, 2015 · 4 comments

Comments

@DorpsGek
Copy link

commented Dec 7, 2015

matthijs opened the ticket and wrote:

It seems that when downloading things through the online content user interface, and ~/.local/share does not exist, the download fails with a "file not writable" error.

strace shows that it tries to open up the final filename right away, which obviously fails:

open("/root/.local/share/openttd/content_download/baseset/OpenSFX-0.2.3.tar.gz", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 ENOENT (No such file or directory)

No mkdir calls happen at all (not even inside ~/.local/share, interestingly). When ~/.local/share does exist, mkdir calls do happen, but only inside ~/local.share. In this case, there is also a failed mkdir for ~/.config/openttd, so there is presumably also a problem for a non-existing ~/.config directory.

This problem was observed on version 1.5.3 and 1.4.4, on a Debian Sid and Jessie system respectively.

In addition, the automatic OpenGFX download (when no gfx are available) fails when ~/.local/share does not exist, though an additional problem is that no error (just a download dialog that gets shown for a fraction of a second, then disappears leaving an empty window).

Reported version: 1.5.3
Operating system: Linux


This issue was imported from FlySpray: https://bugs.openttd.org/task/6399
@Wirdal

This comment has been minimized.

Copy link

commented Jun 3, 2019

I'd like to tackle this.

I haven't looked through the code much, so I will ask, where is the online content user interface defined?

@nielsmh

This comment has been minimized.

Copy link
Contributor

commented Jun 4, 2019

I'd start with src/network/network_content.cpp, there is also a network_content_gui.cpp, and matching .h files.

@Wirdal

This comment has been minimized.

Copy link

commented Jun 5, 2019

OK, thanks. I'll poke around.

Might take a while, I am on the home stretch of finals. So if anyone else wants to work on this, go for it.

@TrueBrain TrueBrain added the pinned label Sep 28, 2019
@sdcloudt

This comment has been minimized.

Copy link

commented Oct 9, 2019

I could not reproduce this issue in the current upstream version of openttd (1.9.+ something) on my Arch Linux system.

First of all, downloaded content is stored in ~/.openttd not in ~/.local/share/openttd on my system. Secondly, deleting this ~/.openttd directory also does not trigger any errors, the directory is just created as expected.

I am not aware of the policy around fixing bugs in old versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.