mirror of https://github.com/OpenTTD/OpenTTD
Change: Log when rejecting a TAR archive for extraction
Based on report in <https://www.tt-forums.net/viewtopic.php?f=31&t=87374>pull/8286/head
parent
3effad0bea
commit
84efde8ee3
|
@ -929,7 +929,10 @@ bool ExtractTar(const char *tar_filename, Subdirectory subdir)
|
||||||
const char *dirname = (*it).second.dirname;
|
const char *dirname = (*it).second.dirname;
|
||||||
|
|
||||||
/* The file doesn't have a sub directory! */
|
/* The file doesn't have a sub directory! */
|
||||||
if (dirname == nullptr) return false;
|
if (dirname == nullptr) {
|
||||||
|
DEBUG(misc, 1, "Extracting %s failed; archive rejected, the contents must be in a sub directory", tar_filename);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
char filename[MAX_PATH];
|
char filename[MAX_PATH];
|
||||||
strecpy(filename, tar_filename, lastof(filename));
|
strecpy(filename, tar_filename, lastof(filename));
|
||||||
|
|
Loading…
Reference in New Issue