-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fix selafin special characters #484
Fix selafin special characters #484
Conversation
…les with non-ANSI character paths do not cause any problems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the stuff!
mdal/mdal_utils.hpp
Outdated
//! Deletes a file. Returns true on success, false otherwise | ||
bool deleteFile( const std::string &path ); | ||
|
||
//!renames a file. Returns true on success, false otherwise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//!renames -> //! Renames
mdal/mdal_utils.cpp
Outdated
std::wstring wStr = converter.from_bytes( path ); | ||
return DeleteFileW( wStr.c_str() ) != 0; | ||
#else | ||
return remove( path.c_str() ) == 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::remove
Thanks! Could you make a patch version (1.1.1) for the last fixes? Or would that be too soon according to the roadmap? |
@uclaros ? |
Fixes #483
First off, a regression test (WriteDatasetSpecialCharacters) was written so that the issue at hand could be reproduced.
Then the issue was fixed. Some instances of std::string had to be converted to std::wstring followed by windows-specific system calls.
The solution is analogous to the way cross-platform strings are currently handled in mdal_utils.h/.cpp.