diff options
author | Hennes Rohling <hro@openoffice.org> | 2001-05-10 13:53:27 +0000 |
---|---|---|
committer | Hennes Rohling <hro@openoffice.org> | 2001-05-10 13:53:27 +0000 |
commit | 4af4dfabae0afc1e7aaf7a39a04c0e19f5ad47dc (patch) | |
tree | fe7752aeba806030092b5edbfc5288f9395f7585 /store | |
parent | cc1352d4add543f6ab48d7df60b52f2311a083e9 (diff) |
#TFU630#
Diffstat (limited to 'store')
-rw-r--r-- | store/source/filelckb.cxx | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/store/source/filelckb.cxx b/store/source/filelckb.cxx index 1e6cfb5f91f5..104c9c6bb8f5 100644 --- a/store/source/filelckb.cxx +++ b/store/source/filelckb.cxx @@ -2,9 +2,9 @@ * * $RCSfile: filelckb.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: mhu $ $Date: 2001-04-17 11:48:35 $ + * last change: $Author: hro $ $Date: 2001-05-10 14:53:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,7 +59,7 @@ * ************************************************************************/ -#define _STORE_FILELCKB_CXX_ "$Revision: 1.6 $" +#define _STORE_FILELCKB_CXX_ "$Revision: 1.7 $" #ifndef _SAL_TYPES_H_ #include <sal/types.h> @@ -509,6 +509,7 @@ inline storeError OFileLockBytes_Impl::create ( // Path conversion result. oslFileError result; +#if 0 // Convert into normalized path. rtl::OUString aNormPath; result = osl_getNormalizedPathFromFileURL ( @@ -533,6 +534,30 @@ inline storeError OFileLockBytes_Impl::create ( // Invalid path. return store_E_InvalidParameter; } +#else + rtl::OUString aSystemPath; + + result = osl_getSystemPathFromFileURL( pFilename, &(aSystemPath.pData) ); + + // Maybe it's alreadey a system path + + if ( osl_File_E_None != result ) + { + rtl::OUString aTempURL; + + result = osl_getFileURLFromSystemPath( pFilename, &(aTempURL.pData) ); + + if (!(result == osl_File_E_None)) + { + // Invalid path. + return store_E_InvalidParameter; + } + else + aSystemPath = pFilename; + } + +#endif + // Convert into system text encoding. rtl::OString aFilename ( |