diff options
author | rubidium <rubidium@openttd.org> | 2011-11-16 16:54:37 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-16 16:54:37 +0000 |
commit | a3a2fdcfc2f8737ed1c52672c473b4fe32ac2bc9 (patch) | |
tree | c1d02f09d8f5a5eac339a90c080096e9e72a0010 /src/fileio.cpp | |
parent | 6548ec6e9ecf0f6d608d0b738213f62b1ce6e584 (diff) | |
download | openttd-a3a2fdcfc2f8737ed1c52672c473b4fe32ac2bc9.tar.xz |
(svn r23234) -Fix [FS#4840]: crash when after downloading content
Diffstat (limited to 'src/fileio.cpp')
-rw-r--r-- | src/fileio.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp index 8f57eb8a5..82b2f7c7e 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -682,6 +682,18 @@ uint TarScanner::DoScan(Subdirectory sd) return num; } +/** + * Add a single file to the scanned files of a tar, circumventing the scanning code. + * @param sd The sub directory the file is in. + * @param filename The name of the file to add. + * @return True if the additions went correctly. + */ +bool TarScanner::AddFile(Subdirectory sd, const char *filename) +{ + this->subdir = sd; + return this->AddFile(filename, 0); +} + bool TarScanner::AddFile(const char *filename, size_t basepath_length, const char *tar_filename) { /* No tar within tar. */ |