[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkdelibs/KDE/4=2E6=5D_kioslave/ftp=3A_Do_not_double_?=
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2011-03-18 17:35:03
Message-ID: 20110318173503.B97F6A60AE () git ! kde ! org
[Download RAW message or body]
Git commit 75bb906e09ada25ad60ccdf3552196b27aed1002 by Dawit Alemayehu.
Committed on 18/03/2011 at 17:57.
Pushed by adawit into branch 'KDE/4.6'.
Do not double encode directory names.
BUG:213496
FIXED-IN:4.6.2
M +3 -5 kioslave/ftp/ftp.cpp
http://commits.kde.org/kdelibs/75bb906e09ada25ad60ccdf3552196b27aed1002
diff --git a/kioslave/ftp/ftp.cpp b/kioslave/ftp/ftp.cpp
index c067ebe..ca0ba61 100644
--- a/kioslave/ftp/ftp.cpp
+++ b/kioslave/ftp/ftp.cpp
@@ -1073,11 +1073,10 @@ void Ftp::mkdir( const KUrl & url, int permissions )
if( !ftpOpenConnection(loginImplicit) )
return;
- QString path = remoteEncoding()->encode(url);
- QByteArray buf = "mkd ";
- buf += remoteEncoding()->encode(path);
+ const QByteArray encodedPath (remoteEncoding()->encode(url));
+ const QString path = QString::fromLatin1(encodedPath.constData(), encodedPath.size());
- if( !ftpSendCmd( buf ) || (m_iRespType != 2) )
+ if( !ftpSendCmd( (QByteArray ("mkd ") + encodedPath) ) || (m_iRespType != 2) )
{
QString currentPath( m_currentPath );
@@ -2128,7 +2127,6 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KUrl& dest_url,
return statusSuccess;
}
-
/** Use the SIZE command to get the file size.
Warning : the size depends on the transfer mode, hence the second arg. */
bool Ftp::ftpSize( const QString & path, char mode )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic