[BaNaNaS] Downloads are not actually saved

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 685
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

[BaNaNaS] Downloads are not actually saved

Post by JacobD88 »

Hi all, having a very strange problem with a BaNaNaS upload i made today
Specifically, the Rise of the Triad OST

BaNaNaS claims to download the set, but does not create the directory or indeed save the content
(Nightly 20200713, Windows 10 Professional x64)

Here's how to replicate (Numbers relate to screenshots also - See PNGs in BaNaNaS Error zip)

1) Locate the set on BaNaNaS

2) Select the set for download

3) Download the set (It will say it's downloaded)

4) The Set will not appear on the base music list under options

5) Returning to content download will reveal the set to be unchecked and not downloaded

6) You can confirm in the content download directory that the set was never copied there

Not sure how to resolve this
Is BaNaNaS having issues?

Many thanks
Attachments
3.png
3.png (1.82 KiB) Viewed 562 times
5.png
5.png (46.58 KiB) Viewed 562 times
BaNaNaS Error.zip
(203.83 KiB) Downloaded 17 times

Transportman
Tycoon
Tycoon
Posts: 2746
Joined: 22 Feb 2011 18:34

Re: [BaNaNaS] Downloads are not actually saved

Post by Transportman »

Where is your OpenTTD installed and where is your openttd.cfg located? It might be downloading to a location it cannot write to, making the download not actually processing (although I would expect some kind of error message if that happens).
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 685
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

Re: [BaNaNaS] Downloads are not actually saved

Post by JacobD88 »

Install is located at

C:\Games\OpenTTD

It's an install i've upgraded with nightlies since OTTD 0.7 all those years ago and openttd.cfg has always been in the location of the main executable

All other content from bananas is downloading correctly it appears

SFC is disabled under WinLogon because i hate Windows 10 telling me what i can do with legacy locations

User avatar
jfs
Tycoon
Tycoon
Posts: 1245
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: [BaNaNaS] Downloads are not actually saved

Post by jfs »

The ROTT soundtrack also fails to download/install properly for me. It might be an issue with the new BaNaNaS somehow, I'll throw a debugger at it in a minute.

Transportman
Tycoon
Tycoon
Posts: 2746
Joined: 22 Feb 2011 18:34

Re: [BaNaNaS] Downloads are not actually saved

Post by Transportman »

jfs wrote:
28 Jul 2020 15:51
The ROTT soundtrack also fails to download/install properly for me. It might be an issue with the new BaNaNaS somehow, I'll throw a debugger at it in a minute.
I tried with the debug logging enabled, it shows that it actually downloaded it, as this is what I get in the logging:

Code: Select all

dbg: [misc] Found tar 'C:\Users\****\Documents\OpenTTD\content_download\baseset\524f5454-Rise_of_the_Triad_OST_NST-1.0.tar' with 30 new files
Going to that location, the file is not there.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

User avatar
jfs
Tycoon
Tycoon
Posts: 1245
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: [BaNaNaS] Downloads are not actually saved

Post by jfs »

Yes I found the problem.
It fails on this bit of code:

Code: Select all

bool ExtractTar(const char *tar_filename, Subdirectory subdir)
{
	TarList::iterator it = _tar_list[subdir].find(tar_filename);
	/* We don't know the file. */
	if (it == _tar_list[subdir].end()) return false;

	const char *dirname = (*it).second.dirname;

	/* The file doesn't have a sub directory! */
	if (dirname == nullptr) return false;
All the files in your TAR file are in the root of the archive. They must be in a subdirectory inside the archive for it to be accepted. As it is, the file gets downloaded, unpacked, and then rejected before extraction, and then deleted.

User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 685
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

Re: [BaNaNaS] Downloads are not actually saved

Post by JacobD88 »

That's a bananas issue then
As i uploaded this ZIP
As attached to BaNaNaS

It must have stripped the directory...

This is possibly because the ZIP and the directory within the ZIP have the same name...
Attachments
rott_ost_v1.zip
(110.85 KiB) Downloaded 45 times

User avatar
jfs
Tycoon
Tycoon
Posts: 1245
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: [BaNaNaS] Downloads are not actually saved

Post by jfs »

Right.

I made a PR to OpenTTD itself to make it log a warning when TAR extraction fails for this reason: https://github.com/OpenTTD/OpenTTD/pull/8283

And a bug report for new BaNaNaS stripping the directories from the archive: https://github.com/OpenTTD/bananas-server/issues/23

User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 685
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

Re: [BaNaNaS] Downloads are not actually saved

Post by JacobD88 »

Brilliant, thanks JFS
Will leave the file alone on BaNaNaS until issue is resolved
Then i will update accordingly if required by any fix :)

Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 5 guests