Conversation
| { | ||
| var firstExtension = filters.Groups[filter].Extensions[0]; | ||
| if (firstExtension != "*") | ||
| { | ||
| name += "." + firstExtension; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Am I high or is this possible to sandbox break because filedialogfilters are entirely user input and we're manually constructing the path here?
There was a problem hiding this comment.
The extension groups shouldn't be user input - in the existing test cases, that should be "yml" and "csv".
I mean, they could be, but why would you do that?
[If it is a problem, and if it can be fixed, I'm all ears.]
There was a problem hiding this comment.
I don't think we have any existing restrictions around file formats, e.g. if some fork wants to use their own format, or wants their own tigher whitelist, which I don't know if we want to support or not. it may become a problem when video resources get implemented so maybe better to just allow any extensions to be used for filters.
|
Epic |
Title.
Adds an optional parameter called
appendExtensiontoFileDialogManager.SaveFile, defaulting to false (preserving existing behaviour - shouldn't break anything as-is). When set to true, if a file is selected for saving, the extension is added to the file if the entered file name:IFileDialogManagerImplementation.OpenFile,SaveFileedited to receive the filter index to get the expected file extension to append to the file.To test:
golobby, enter the character menu.