diff options
author | Ladislav Zezula <zezula-at-volny-dot-cz> | 2017-11-08 18:17:52 +0100 |
---|---|---|
committer | Ladislav Zezula <zezula-at-volny-dot-cz> | 2017-11-08 18:17:52 +0100 |
commit | e549b5db4c8a02b8a4b9cce9477720c103d8e339 (patch) | |
tree | c74e1fc979f9e18a5374ae67ee214cf9db16b002 /src/SFileListFile.cpp | |
parent | 251c47d32087eff23c8fc20f073cdbf0a1d1a845 (diff) |
+ Tilde can now be a part of file name in the MPQ
Diffstat (limited to 'src/SFileListFile.cpp')
-rw-r--r-- | src/SFileListFile.cpp | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/SFileListFile.cpp b/src/SFileListFile.cpp index 3fa695f..57ef7f9 100644 --- a/src/SFileListFile.cpp +++ b/src/SFileListFile.cpp @@ -265,7 +265,6 @@ static char * ReadListFileLine(TListFileCache * pCache, size_t * PtrLength) {
LPBYTE pbLineBegin;
LPBYTE pbLineEnd;
- LPBYTE pbExtraString = NULL;
// Skip newlines. Keep spaces and tabs, as they can be a legal part of the file name
while(pCache->pPos < pCache->pEnd && (pCache->pPos[0] == 0x0A || pCache->pPos[0] == 0x0D))
@@ -276,32 +275,13 @@ static char * ReadListFileLine(TListFileCache * pCache, size_t * PtrLength) return NULL;
pbLineBegin = pbLineEnd = pCache->pPos;
- // Copy the remaining characters
+ // Find the end of the line
while(pCache->pPos < pCache->pEnd && pCache->pPos[0] != 0x0A && pCache->pPos[0] != 0x0D)
- {
- // Blizzard listfiles can also contain information about patch:
- // Pass1\Files\MacOS\unconditional\user\Background Downloader.app\Contents\Info.plist~Patch(Data#frFR#base-frFR,1326)
- if(pCache->pPos[0] == '~')
- pbExtraString = pCache->pPos;
-
- // Copy the character
pCache->pPos++;
- }
- // If there was extra string after the file name, clear it
- if(pbExtraString != NULL)
- {
- if(pbExtraString[0] == '~' && pbExtraString[1] == 'P')
- {
- pbLineEnd = pbExtraString;
- pbLineEnd[0] = 0;
- }
- }
- else
- {
- pbLineEnd = pCache->pPos++;
- pbLineEnd[0] = 0;
- }
+ // Remember the end of the line
+ pbLineEnd = pCache->pPos++;
+ pbLineEnd[0] = 0;
// Give the line to the caller
if(PtrLength != NULL)
|