Hello community, here is the log from the commit of package kdelibs3 checked in at Wed Jul 9 21:26:08 CEST 2008. -------- --- KDE/kdelibs3/kdelibs3.changes 2008-06-03 14:46:57.000000000 +0200 +++ kdelibs3/kdelibs3.changes 2008-07-03 07:14:41.000000000 +0200 @@ -1,0 +2,5 @@ +Thu Jul 3 07:14:37 CEST 2008 - dmueller@suse.de + +- fix ftp protocol overwriting existing files during rename (bnc#399296) + +------------------------------------------------------------------- New: ---- bug-399296_ftphandling-fix.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdelibs3-devel-doc.spec ++++++ --- /var/tmp/diff_new_pack.q19894/_old 2008-07-09 21:23:16.000000000 +0200 +++ /var/tmp/diff_new_pack.q19894/_new 2008-07-09 21:23:16.000000000 +0200 @@ -24,7 +24,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Additional Package Documentation Version: 3.5.9 -Release: 49 +Release: 55 %define kdelibs_patch_level b BuildArch: noarch Requires: kdelibs3 qt3-devel-doc ++++++ kdelibs3.spec ++++++ --- /var/tmp/diff_new_pack.q19894/_old 2008-07-09 21:23:16.000000000 +0200 +++ /var/tmp/diff_new_pack.q19894/_new 2008-07-09 21:23:16.000000000 +0200 @@ -31,7 +31,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: KDE Base Libraries Version: 3.5.9 -Release: 47 +Release: 53 Obsoletes: kde3-i18n kups keramik kdelibs3-cups kdelibs3-33addons kdepim3-networkstatus Provides: kups keramik kdelibs3-cups kdelibs3-33addons kdepim3-networkstatus Provides: kdelibs3_base = 3.3 @@ -130,6 +130,7 @@ Patch149: networkstatus.diff Patch150: kdesu-settings.diff Patch151: fix-kde3-wrapper-usage.diff +Patch152: bug-399296_ftphandling-fix.diff %description This package contains kdelibs, one of the basic packages of the K @@ -331,6 +332,7 @@ %patch149 %patch150 %patch151 +%patch152 tar xfvj %SOURCE12 # # define KDE version exactly @@ -825,6 +827,8 @@ /opt/kde3/%_lib/libconnectionmanager.so %changelog +* Thu Jul 03 2008 dmueller@suse.de +- fix ftp protocol overwriting existing files during rename (bnc#399296) * Tue Jun 03 2008 stbinner@suse.de - fix Desktop and Network icons missing in kcontrol (bnc#396153) * Tue May 27 2008 llunak@suse.cz ++++++ bug-399296_ftphandling-fix.diff ++++++ --- kioslave/ftp/ftp.cc 2007-05-14 09:52:34.000000000 +0200 +++ kioslave/ftp/ftp.cc 2008-06-10 17:13:41.000000000 +0200 @@ -1264,6 +1264,16 @@ // TODO honor overwrite assert( m_bLoggedOn ); + // Must check if dst already exists, RNFR+RNTO overwrites by default (#127793). + if (ftpFileExists(dst)) { + error(ERR_FILE_ALREADY_EXIST, dst); + return false; + } + if (ftpFolder(dst, false)) { + error(ERR_DIR_ALREADY_EXIST, dst); + return false; + } + int pos = src.findRev("/"); if( !ftpFolder(src.left(pos+1), false) ) return false; @@ -2393,6 +2403,19 @@ return true; } +bool Ftp::ftpFileExists(const QString& path) +{ + QCString buf; + buf = "SIZE "; + buf += remoteEncoding()->encode(path); + if( !ftpSendCmd( buf ) || (m_iRespType != 2) ) + return false; + + // skip leading "213 " (response code) + const char* psz = ftpResponse(4); + return psz != 0; +} + // Today the differences between ASCII and BINARY are limited to // CR or CR/LF line terminators. Many servers ignore ASCII (like // win2003 -or- vsftp with default config). In the early days of --- kioslave/ftp/ftp.h 2007-01-15 12:34:08.000000000 +0100 +++ kioslave/ftp/ftp.h 2008-06-10 13:51:51.000000000 +0200 @@ -350,6 +350,11 @@ /** * Set the current working directory, but only if not yet current */ + bool ftpFileExists(const QString& path); + + /** + * Set the current working directory, but only if not yet current + */ bool ftpFolder(const QString& path, bool bReportError); /** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org