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

Scandinavian characters are not allowed in path #322

Open
TheBaronOfDubstep opened this issue Aug 31, 2023 · 4 comments
Open

Scandinavian characters are not allowed in path #322

TheBaronOfDubstep opened this issue Aug 31, 2023 · 4 comments

Comments

@TheBaronOfDubstep
Copy link

TheBaronOfDubstep commented Aug 31, 2023

It seems that the PInvoke library throws a hissyfit when attempting to use the scandianvaian characters æøåöä in a file path.

It also seems the above happens when you are attempting to access a one-drive mounted at a directory (for example: c:\users\JohnDoe\OneDrive - JohnDoe Incompentency Consulting\Æøå Project\file.h5)

If this is a P-Invoke issue, you may want to filter on such paths and throw an argumentexception.

Let me know, and if you agree, I'll send you a pullrequest for this :)

@LiorBanai
Copy link
Owner

Sure go ahead. It is broken anyway..

Thanks!

@TheBaronOfDubstep
Copy link
Author

PR added. Let me know if there's anything else I can help with

TheBaronOfDubstep added a commit to TheBaronOfDubstep/HDF5-CSharp that referenced this issue Sep 2, 2023
LiorBanai pushed a commit that referenced this issue Sep 15, 2023
* Added input validation to OpenFile and CreateFile methods #322

* feat: mapping to Kernel32.dll

* fix: Added overloads as desired by Codacy

* fix: reverted back from overloading as Codacy does indeed promote code standards in breach with best guidelines

* feat: Added unit tests for input sanitation and short pathing
bug: file referenced in path needs to exist for shortpath to work. Check and exceptions added.
@LiorBanai
Copy link
Owner

@TheBaronOfDubstep THanks for the improvments. I'll release new version soon.

@TheBaronOfDubstep
Copy link
Author

TheBaronOfDubstep commented Sep 15, 2023

@LiorBanai hit me up if you're up for a refactoring/expansiob of the project

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

No branches or pull requests

2 participants