ooo-build r12926 - in trunk: . patches/dev300



Author: tml
Date: Thu Jun 19 15:18:51 2008
New Revision: 12926
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12926&view=rev

Log:
2008-06-19  Tor Lillqvist  <tml novell com>

	* patches/dev300/win32-invalid-names.diff: New file. Fixes
	bnc#277603. 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.

	* patches/dev300/apply: Add it to Fixes.



Added:
   trunk/patches/dev300/win32-invalid-names.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Thu Jun 19 15:18:51 2008
@@ -495,6 +495,13 @@
 # otherwise, cws-extract does not work with perl-5.10 on openSUSE-11.0
 solenv-cwsid.diff, i#90853, pmladek
 
+# 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.
+win32-invalid-names.diff, n#277603, tml
+
+
 [ RadioButtons ]
 # Add a GroupName property to RadioButtons so that RadioButtons don't need to
 # share the same name to be part of the same group.

Added: trunk/patches/dev300/win32-invalid-names.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/win32-invalid-names.diff	Thu Jun 19 15:18:51 2008
@@ -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 )
+ 		    {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]