gkngkc / UnityStandaloneFileBrowser

A native file browser for unity standalone platforms
MIT License
2.01k stars 317 forks source link

Filename containing commas is split into multiple entries #5

Closed dbouianov closed 7 years ago

dbouianov commented 7 years ago

Here's an example of a valid filename we work with:

"Final total approved set Nov 28,2016 14012_INTERLEAF_Approved_Plans_6546176-6473974-page5.pdf"

Comma is a valid character in an actual filename, but it's used to separate filename entries from each other inside the Mac plugin, regardless of whether multi-select flag is set to true.

The plugin needs to avoid separating filename entries with any character that can be present in the filename itself. One way to fix this is for the plugin to return an array instead of a string consisting of filenames with a separator character in between.

gkngkc commented 7 years ago

Oops i didn't think that :)

I think returning array from obj-c is unnecessary complexity for this task so i changed separator character to ascii control character 28.

Thanks for pointing it out.

dbouianov commented 7 years ago

Works like a charm, thank you!