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

Closed
DorpsGek opened this issue Dec 7, 2015 · 4 comments
Closed
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers

Comments

@DorpsGek
Copy link
Member

DorpsGek 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
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
@TrueBrain TrueBrain added good first issue Good for newcomers bug Something isn't working and removed bug from FlySpray labels Apr 10, 2018
@frosch123 frosch123 removed the Core label Apr 14, 2018
@andythenorth andythenorth added the stale Stale issues label Jan 5, 2019
@andythenorth andythenorth removed the stale Stale issues label Jan 13, 2019
@Wirdal
Copy link

Wirdal 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
Copy link
Contributor

nielsmh 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
Copy link

Wirdal 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.

@sdcloudt
Copy link
Contributor

sdcloudt 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
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants