Skip to content

bugfix(filesystem): Preserve native separators in archive listings - #3141

Draft
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/archive-listing-separator
Draft

bugfix(filesystem): Preserve native separators in archive listings#3141
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/archive-listing-separator

Conversation

@bobtista

Copy link
Copy Markdown

ArchiveFile::getFileListInDirectory appends '\\' unless the path already ends in one, so a caller that supplies a path ending in the platform separator gets both characters in every listed name. Nothing upstream passes such a path today, but #3107 makes loadMapsFromDisk build its search path with appendPathSeparator, and off Windows every archived map is then listed under a mixed path:

before:  maps/\lone eagle\lone eagle.map
after:   maps/lone eagle/lone eagle.map

No map cache lookup matches the mixed form, so the stock maps read as absent. In a network game that means a client which has the map is told it does not, and the lobby will not let it ready up.

Now the check accepts either separator and appends the platform one, so the listing keeps whichever shape the caller used.

Todo:

  • Archived maps are listed under a single separator
  • A client that has the map is not asked to transfer it
  • Replicate to Generals — N/A, it's in Core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant