Myster-Tee / NxFileViewer

Tool to view Nintendo Switch file
GNU General Public License v3.0
200 stars 16 forks source link

Error when trying to save a file from the Content tab #20

Open jasonsperske opened 7 months ago

jasonsperske commented 7 months ago

I expanded the "(Program)/Section 0/main" file in the content tab and selected "Save As", this causes a dialog to appear but when I click on Save" no file is created. In the logs I see the following error:

''' Failed to save file: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') '''

NxFileViewer-bug

I opened the src in VSStudio and traced it to the this line of code:

var filePath = fileDialog.FileName;

found in https://github.com/Myster-Tee/NxFileViewer/blob/master/src/NxFileViewer/Services/Prompting/PromptService.cs#L76C9-L76C44

For some reason the CommonSaveFileDialog is throwing an exception when you attempt to access the fileDialog.FileName. I have a pull request that changes the PromptService to use the System.Windows.Forms.SaveFileDialog and System.Windows.Forms.FolderBrowserDialog and I've tested these in all of the code paths that that use them.

Maxxgold commented 5 months ago

This is still broken on 2.7.0 I had to drop down to 2.6.1

feiercrack commented 1 month ago

..same issue here.. what to do???

update: with downgrade to v2.61 it works.