You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Poco::Path::forDirectory("G:\\abc\\"); // OKPoco::Path::forDirectory("G:\\abc"); // OKPoco::Path::forDirectory("G:\\"); // OKPoco::Path::forDirectory("G:"); // Poco::PathSyntaxException// Why not auto add backslash for directories// If I use Poco::Path, I have to do something else like this:
std::string str = "G:";
if (!str.ends_with('\\'))
{
str.push_back('\\'); // To ensure Poco::Path not crash for me
}
Poco::Path::forDirectory(str);
Describe the solution you'd like
// If Poco::Path can auto add backslash for me, It can make my code looks more clean.
std::string str = "G:";
Poco::Path::forDirectory(str); // Please do not throw any exception
Describe alternatives you've considered
Or Poco can add some methods just like Windows API PathAddBackslash do
This discussion was converted from issue #4562 on June 02, 2024 01:25.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Describe alternatives you've considered
Or Poco can add some methods just like Windows API
PathAddBackslash
doLPWSTR PathAddBackslashW( [in, out] LPWSTR pszPath );
Beta Was this translation helpful? Give feedback.
All reactions