[ooo-build-commit] patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Sep 11 10:13:42 PDT 2009


 patches/dev300/apply                        |    4 +-
 patches/dev300/win32-invalid-names-m57.diff |   48 ++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 1 deletion(-)

New commits:
commit ff03e97f14c2ddc52d96f1c18023d4f0872123f1
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Sep 11 13:13:55 2009 -0400

    Proper branching of win32-invalid-names.diff.
    
    * patches/dev300/apply:
    * patches/dev300/win32-invalid-names-m57.diff:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index d11e478..0549a62 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -498,12 +498,14 @@ localize-pl-cygwin-paths.diff, tml
 # FIXME 2008-11-26: the mailmerge.py in dev300-m35 doesn't have any #! line at all!?
 #scripting-mailmerge-python-binary.diff, pmladek
 
-[ Fixes < dev300-m58 ]
 # Allow some technically illegal pathname components on Win32
 # (directories with trailing spaces or periods) because some SMB
 # servers like Netware (and Samba, if mangled names = No) do serve
 # such directories if they exist on the server's host system.
+[ Fixes >= dev300-m58 ]
 win32-invalid-names.diff, n#277603, tml
+[ Fixes < dev300-m58 ]
+win32-invalid-names-m57.diff, n#277603, tml
 
 [ Fixes ]
 # make CustomUnitText "Pixel" localisable
diff --git a/patches/dev300/win32-invalid-names-m57.diff b/patches/dev300/win32-invalid-names-m57.diff
new file mode 100644
index 0000000..4ce8840
--- /dev/null
+++ b/patches/dev300/win32-invalid-names-m57.diff
@@ -0,0 +1,48 @@
+--- sal/osl/w32/file.cxx	2006-12-01 17:56:16.000000000 +0000
++++ sal/osl/w32/file.cxx	2007-06-08 10:30:26.828125000 +0000
+@@ -175,6 +175,7 @@ using namespace osl;
+ #define VALIDATEPATH_ALLOW_ELLIPSE			0x0002
+ #define VALIDATEPATH_ALLOW_RELATIVE			0x0004
+ #define VALIDATEPATH_ALLOW_UNC				0x0008
++#define VALIDATEPATH_ALLOW_INVALID_SPACE_AND_PERIOD 0x0010
+ 
+ #define WSTR_SYSTEM_ROOT_PATH				L"\\\\.\\"
+ 
+@@ -1108,9 +1109,10 @@ namespace /* private */
+ 			    case '.':
+ 				    if ( dwFlags & VALIDATEPATH_ALLOW_ELLIPSE )
+ 				    {
+-					    if ( 1 == lpCurrent - lpComponent )
++					    if ( (dwFlags & VALIDATEPATH_ALLOW_INVALID_SPACE_AND_PERIOD) ||
++							 1 == lpCurrent - lpComponent )
+ 					    {
+-						    /* Current directory is O.K. */
++						    /* Either do allow periods anywhere, or current directory */
+ 						    lpComponentEnd = lpCurrent;
+ 						    break;
+ 					    }
+@@ -1123,8 +1125,13 @@ namespace /* private */
+ 				    }
+ 			    case 0:
+ 			    case ' ':
+-				    lpComponentEnd = lpCurrent - 1;
+-				    fValid = FALSE;
++					if ( dwFlags & VALIDATEPATH_ALLOW_INVALID_SPACE_AND_PERIOD )
++						lpComponentEnd = lpCurrent;
++					else
++					{
++						lpComponentEnd = lpCurrent - 1;
++						fValid = FALSE;
++					}
+ 				    break;
+ 			    default:
+ 				    lpComponentEnd = lpCurrent;
+@@ -1365,7 +1372,7 @@ namespace /* private */
+                 lpComponent = lpszPath + i;
+             }
+ 
+-		    fValid = IsValidFilePathComponent( lpComponent, &lpComponent, dwFlags );
++		    fValid = IsValidFilePathComponent( lpComponent, &lpComponent, dwFlags | VALIDATEPATH_ALLOW_INVALID_SPACE_AND_PERIOD);
+ 
+ 		    if ( fValid && lpComponent )
+ 		    {


More information about the ooo-build-commit mailing list