Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Windows, file dialogs display extension filters followed by a ';' #113

Conversation

hfmrow
Copy link
Contributor

@hfmrow hfmrow commented Aug 13, 2024

On Windows, file dialogs display extension filters followed by a ';' even when it's not necessary.

before:
1

after:
2

  • A simple fix for file dialog handling on Windows regarding extension filters.

I hope this is more understandable.

hfmrow and others added 2 commits August 13, 2024 17:27
- A simple fix for file dialog handling on Windows regarding extension filters.
@ncruces
Copy link
Owner

ncruces commented Aug 14, 2024

Much clearer thanks! I could understand the goal, but not the fix.

This was actually a memory bug, as I was removing a needed null terminator.
Hope you don't mind the change, it's clearer for me.

I'll merge but I'd appreciate you testing before I tag a new release.

@ncruces ncruces merged commit 848f6d0 into ncruces:master Aug 14, 2024
3 checks passed
@hfmrow
Copy link
Contributor Author

hfmrow commented Aug 14, 2024

I also appreciate clarity. I must admit that a few years have passed since my last PR, and I simply pushed my changes without considering the need for a thorough analysis.

Regarding the tests, they were carried out, and everything works correctly. Your way of fixing the issue is better than mine. I applied a patch for the visual aspect, and due to my lack of knowledge of your code, I didn’t deeply investigate the root cause of the issue. But indeed, string termination in C is done with '0', and if it's missing, it can cause serious problems.

My usage of your library I use your library because I’m using 'fyne' to generate the graphical interface for my applications. It’s very convenient for me since it’s cross-platform and works on both Android and iOS. However, the 'fyne' file explorer is quite limited on Windows and Linux. So, I made a wrapper that allows the use of the native OS file explorers while keeping the 'fyne' logic for file management, all thanks to your work. By the way, thank you for that.

Best regards, hfmrow.

@ncruces
Copy link
Owner

ncruces commented Sep 4, 2024

Sorry, took me a while to tag. Done.

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.

2 participants