Skip to content

Commit 97dcefd

Browse files
committed
Fixed file conflicts when a resource name contains square brackets
1 parent 1443c28 commit 97dcefd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

MTA10_Server/mods/deathmatch/logic/CResourceManager.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ bool CResourceManager::Refresh ( bool bRefreshAll, const SString& strJustThisRes
105105
if ( bIsDir && ( strName.BeginsWith( "#" ) || ( strName.BeginsWith( "[" ) && strName.EndsWith( "]" ) ) ) )
106106
{
107107
resourcesPathList.push_back ( PathJoin ( strResourcesRelPath, strName ) );
108-
continue;
109108
}
110109

111110
// Extract file extension
@@ -120,12 +119,12 @@ bool CResourceManager::Refresh ( bool bRefreshAll, const SString& strJustThisRes
120119
// Ignore items that have dot or space in the name
121120
if ( strName.Contains ( "." ) || strName.Contains ( " " ) )
122121
{
123-
if ( strJustThisResource.empty () )
122+
if ( !bIsDir && strJustThisResource.empty () )
124123
CLogger::LogPrintf ( "WARNING: Not loading resource '%s' as it contains illegal characters\n", *strName );
125124
continue;
126125
}
127126

128-
// Ignore dir items with no meta.xml (assume it's the result of saved files from a zipped resource)
127+
// Ignore dir items with no meta.xml
129128
if ( bIsDir && !FileExists ( PathJoin ( strResourcesAbsPath, strName, "meta.xml" ) ) )
130129
continue;
131130

0 commit comments

Comments
 (0)