[LLVMdev] Win32/Path.cpp - isValid method has a bug

Henrik Bach henrik_bach_llvm at hotmail.com
Thu Jan 13 10:10:18 PST 2005


Hi,

I think the Win32/Path.cpp - especially method isValid has a bug:
-----------------
...
  // A file or directory name may not end in a period.
  if (path[len-1] == '.')
    return false;
  if (len >= 2 && path[len-2] == '.' && path[len-1] == '/')
    return false;
...
-----------------

This is valid on windows cmd prompt: 'dir \.' (root dir) and 'dir .\' 
(current dir). This behavior is missing in above method.

Henrik.


=============================================================
Henrik Bach
LLVM Open Source Developer

e-mail: henrik_bach_llvm at hotmail.com
=============================================================
'Nothing is impossible; The impossible just takes longer time :)' - Inventor 
of a new energy saver light bulp from Denmark.

No software patents - Thank you Poland: 
http://www.nosoftwarepatents.com/en/m/intro/app0411.html
Got Freedom?
Software Freedom Day - 28th of August
http://www.softwarefreedomday.org/
=============================================================

_________________________________________________________________
Del din verden med MSN Spaces http://spaces.msn.com




More information about the llvm-dev mailing list