1 --- sal/osl/w32/file.cxx 2006-12-01 17:56:16.000000000 +0000
2 +++ sal/osl/w32/file.cxx 2007-06-08 10:30:26.828125000 +0000
3 @@ -175,6 +175,7 @@ using namespace osl;
4 #define VALIDATEPATH_ALLOW_ELLIPSE 0x0002
5 #define VALIDATEPATH_ALLOW_RELATIVE 0x0004
6 #define VALIDATEPATH_ALLOW_UNC 0x0008
7 +#define VALIDATEPATH_ALLOW_INVALID_SPACE_AND_PERIOD 0x0010
9 #define WSTR_SYSTEM_ROOT_PATH L"\\\\.\\"
11 @@ -1108,9 +1109,10 @@ namespace /* private */
13 if ( dwFlags & VALIDATEPATH_ALLOW_ELLIPSE )
15 - if ( 1 == lpCurrent - lpComponent )
16 + if ( (dwFlags & VALIDATEPATH_ALLOW_INVALID_SPACE_AND_PERIOD) ||
17 + 1 == lpCurrent - lpComponent )
19 - /* Current directory is O.K. */
20 + /* Either do allow periods anywhere, or current directory */
21 lpComponentEnd = lpCurrent;
24 @@ -1123,8 +1125,13 @@ namespace /* private */
28 - lpComponentEnd = lpCurrent - 1;
30 + if ( dwFlags & VALIDATEPATH_ALLOW_INVALID_SPACE_AND_PERIOD )
31 + lpComponentEnd = lpCurrent;
34 + lpComponentEnd = lpCurrent - 1;
39 lpComponentEnd = lpCurrent;
40 @@ -1365,7 +1372,7 @@ namespace /* private */
41 lpComponent = lpszPath + i;
44 - fValid = IsValidFilePathComponent( lpComponent, &lpComponent, dwFlags );
45 + fValid = IsValidFilePathComponent( lpComponent, &lpComponent, dwFlags | VALIDATEPATH_ALLOW_INVALID_SPACE_AND_PERIOD);
47 if ( fValid && lpComponent )