diff options
author | Joachim Lingner <jl@openoffice.org> | 2010-05-06 17:19:12 +0200 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2010-05-06 17:19:12 +0200 |
commit | a9dbaec3087911f20e5781d98586bd1ec9b0937b (patch) | |
tree | b628e14bbf21e450790118b6fccc3c50092ee881 /ucb/source/ucp | |
parent | b75b12d033c0da4f78287811a68a5d5dce5d39f1 (diff) |
jl152 i111434 ucb failes when copying folders, which contain files containing percent signs
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r-- | ucb/source/ucp/file/shell.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 769e58c08819..f324c93b878f 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -33,6 +33,7 @@ #endif #include "osl/diagnose.h" +#include <rtl/uri.hxx> #include <rtl/ustrbuf.hxx> #include <osl/time.h> #include <osl/file.hxx> @@ -2054,9 +2055,14 @@ shell::copy_recursive( const rtl::OUString& srcUnqPath, rtl::OUString newDstUnqPath = dstUnqPath; rtl::OUString tit; if( aFileStatus.isValid( FileStatusMask_FileName ) ) - tit = aFileStatus.getFileName(); + tit = rtl::Uri::encode( aFileStatus.getFileName(), + rtl_UriCharClassPchar, + rtl_UriEncodeIgnoreEscapes, + RTL_TEXTENCODING_UTF8 ); + if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 ) newDstUnqPath += rtl::OUString::createFromAscii( "/" ); + newDstUnqPath += tit; if ( newSrcUnqPath != dstUnqPath ) |