U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Bug? Directoryexists does not recognise directory if...
Re: Bug? Directoryexists does not recognise directory if... [message #44435 is a reply to message #44432] Thu, 12 March 2015 08:28 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
aftershock wrote on Wed, 11 March 2015 19:10
Directoryexists does not recognise directory if path contains a separator at the end on Windows.
Bug?


That is why I need to that.
String dir = GetFileDirectory ( filename );

if ( dir.EndsWith ( DIR_SEPS ) )
dir = dir.Left ( dir.GetCount() - 1 );




if ( DirectoryExists ( dir ) )
{



A.


In this case, our behavior is simply the same as the behavior of API we are calling...

My take is that with separator at the end, it is not correct directory path anymore. Win32 API agrees.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: rounding to decimals implementation
Next Topic: Is guilock safe?
Goto Forum:
  


Current Time: Tue Jun 16 22:39:41 GMT+2 2026

Total time taken to generate the page: 0.00636 seconds