sal/osl/w32/file_dirvol.cxx | 4 ++-- sal/osl/w32/file_url.cxx | 12 ++++-------- sal/osl/w32/file_url.hxx | 1 - 3 files changed, 6 insertions(+), 11 deletions(-)
New commits: commit ddf08a9478ce8ea44f7b6d0ef04176e94fca2706 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri May 12 15:45:47 2017 +0200 Remove IsValidFilePath lppError parameter; always null Change-Id: Ia13c62cdd8ff8b930f82d32310f10fa5279cae81 Reviewed-on: https://gerrit.libreoffice.org/37718 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx index 36aea40cdc01..ff1e037e46a7 100644 --- a/sal/osl/w32/file_dirvol.cxx +++ b/sal/osl/w32/file_dirvol.cxx @@ -755,7 +755,7 @@ oslFileError SAL_CALL osl_openDirectory(rtl_uString *strDirectoryPath, oslDirect if ( osl_File_E_None != error ) return error; - dwPathType = IsValidFilePath( strSysDirectoryPath, nullptr, VALIDATEPATH_NORMAL, nullptr ); + dwPathType = IsValidFilePath( strSysDirectoryPath, VALIDATEPATH_NORMAL, nullptr ); if ( dwPathType & PATHTYPE_IS_SERVER ) { @@ -996,7 +996,7 @@ oslFileError SAL_CALL osl_getDirectoryItem(rtl_uString *strFilePath, oslDirector if ( osl_File_E_None != error ) return error; - dwPathType = IsValidFilePath( strSysFilePath, nullptr, VALIDATEPATH_NORMAL, nullptr ); + dwPathType = IsValidFilePath( strSysFilePath, VALIDATEPATH_NORMAL, nullptr ); if ( dwPathType & PATHTYPE_IS_VOLUME ) type = PATHTYPE_VOLUME; diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx index c31fb24711d3..d45cbda1e93b 100644 --- a/sal/osl/w32/file_url.cxx +++ b/sal/osl/w32/file_url.cxx @@ -154,7 +154,7 @@ static BOOL IsValidFilePathComponent( #define CHARSET_SEPARATOR TEXT("\\/") -DWORD IsValidFilePath(rtl_uString *path, LPCWSTR *lppError, DWORD dwFlags, rtl_uString **corrected) +DWORD IsValidFilePath(rtl_uString *path, DWORD dwFlags, rtl_uString **corrected) { LPCWSTR lpszPath = SAL_W(path->buffer); LPCWSTR lpComponent = lpszPath; @@ -302,12 +302,8 @@ DWORD IsValidFilePath(rtl_uString *path, LPCWSTR *lppError, DWORD dwFlags, rtl_u if ( fValid && !( dwPathType & PATHTYPE_IS_LONGPATH ) && _tcslen( lpszPath ) >= MAX_PATH ) { fValid = FALSE; - lpComponent = lpszPath + MAX_PATH; } - if ( lppError ) - *lppError = lpComponent; - return fValid ? dwPathType : PATHTYPE_ERROR; } @@ -722,7 +718,7 @@ oslFileError osl_getSystemPathFromFileURL_( rtl_uString *strURL, rtl_uString **p } } - if ( IsValidFilePath( strTempPath, nullptr, VALIDATEPATH_ALLOW_ELLIPSE, &strTempPath ) ) + if ( IsValidFilePath( strTempPath, VALIDATEPATH_ALLOW_ELLIPSE, &strTempPath ) ) nError = osl_File_E_None; } else if ( bAllowRelative ) /* This maybe a relative file URL */ @@ -730,7 +726,7 @@ oslFileError osl_getSystemPathFromFileURL_( rtl_uString *strURL, rtl_uString **p /* In future the relative path could be converted to absolute if it is too long */ rtl_uString_assign( &strTempPath, strDecodedURL ); - if ( IsValidFilePath( strTempPath, nullptr, VALIDATEPATH_ALLOW_RELATIVE | VALIDATEPATH_ALLOW_ELLIPSE, &strTempPath ) ) + if ( IsValidFilePath( strTempPath, VALIDATEPATH_ALLOW_RELATIVE | VALIDATEPATH_ALLOW_ELLIPSE, &strTempPath ) ) nError = osl_File_E_None; } else @@ -761,7 +757,7 @@ oslFileError osl_getFileURLFromSystemPath( rtl_uString* strPath, rtl_uString** p DWORD dwPathType = PATHTYPE_ERROR; if (strPath) - dwPathType = IsValidFilePath(strPath, nullptr, VALIDATEPATH_ALLOW_RELATIVE, nullptr); + dwPathType = IsValidFilePath(strPath, VALIDATEPATH_ALLOW_RELATIVE, nullptr); if (dwPathType) { diff --git a/sal/osl/w32/file_url.hxx b/sal/osl/w32/file_url.hxx index f969b637225e..39bbc99b309c 100644 --- a/sal/osl/w32/file_url.hxx +++ b/sal/osl/w32/file_url.hxx @@ -55,7 +55,6 @@ DWORD IsValidFilePath ( rtl_uString * path, - LPCWSTR * lppError, DWORD dwFlags, rtl_uString ** corrected ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits