salesforce / p4-fusion

A fast Perforce to Git conversion tool written in C++ using Perforce Helix Core C++ API and Libgit2
BSD 3-Clause "New" or "Revised" License
78 stars 17 forks source link

Filenames containing special characters renamed to HTML encoded variant #74

Open ppavacic opened 9 months ago

ppavacic commented 9 months ago

For example, file named helloworld#1.jpg in perforce is renamed to helloworld%231.jpg in git. File named helloworld%1.png in perforce is renamed to helloworld%251.png. # = %23 % = %25

I assume that somewhere where files is being requested you simply use end of url as file name

twarit-waikar commented 9 months ago

I assume that somewhere where files is being requested you simply use end of url as file name

We do take the file name that we get back as is, but apparently there is some HTML encoding taking place which shouldn't actually be there.

ppavacic commented 9 months ago

I can patch it, got any pointers where to look?

twarit-waikar commented 9 months ago

@ppavacic Thank you for looking! Probably could start here by seeing how BranchedFileGroups is handling file paths, because that's what in the end goes to the GitAPI like so

ppavacic commented 9 months ago

@twarit-waikar not sure which url-decode library should I add? Do you have any suggestions? perhaps this one: https://github.com/cpp-netlib/url, fork of: https://github.com/cpp-netlib/uri