[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kioslave/file
From: Patrick Spendrin <ps_ml () gmx ! de>
Date: 2010-07-16 14:46:23
Message-ID: 20100716144623.51BFFAC73D () svn ! kde ! org
[Download RAW message or body]
SVN commit 1150707 by sengels:
in case the destination directory doesn't exist, copying should create it.
M +19 -0 file_win.cpp
--- trunk/KDE/kdelibs/kioslave/file/file_win.cpp #1150706:1150707
@@ -141,6 +141,11 @@
dwFlags = 0;
}
+ if( !QFileInfo(_dest.dir().absolutePath()).exists() )
+ {
+ _dest.dir().mkdir(_dest.dir().absolutePath());
+ }
+
if ( CopyFileExW( ( LPCWSTR ) _src.filePath().utf16(),
( LPCWSTR ) _dest.filePath().utf16(),
CopyProgressRoutine,
@@ -154,6 +159,20 @@
else if ( dwLastErr == ERROR_ACCESS_DENIED )
error( KIO::ERR_ACCESS_DENIED, _dest.filePath() );
else {
+#if 0
+ LPVOID lpMsgBuf;
+
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ dwLastErr,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) &lpMsgBuf,
+ 0, NULL );
+ OutputDebugString((WCHAR*)lpMsgBuf);
+#endif
error( KIO::ERR_CANNOT_RENAME, _src.filePath() );
kDebug( 7101 ) << "Copying file "
<< _src.filePath()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic