KDE/kdelibs/kioslave/ftp
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Mon Sep 15 19:07:56 CEST 2008
SVN commit 861282 by chehrlic:
- fix a crash on windows - closing a fd twice isn't a good idea (but seems to work on linux)
- avoid some detaches
should be backported :)
BUG: 170456
CCMAIL: kde-windows at kde.org
M +4 -3 ftp.cpp
--- trunk/KDE/kdelibs/kioslave/ftp/ftp.cpp #861281:861282
@@ -2189,7 +2189,7 @@
{
// check if source is ok ...
KDE_struct_stat buff;
- QByteArray sSrc( QFile::encodeName(sCopyFile) );
+ const QByteArray sSrc( QFile::encodeName(sCopyFile) );
bool bSrcExists = (KDE_stat( sSrc.data(), &buff ) != -1);
if(bSrcExists)
{ if(S_ISDIR(buff.st_mode))
@@ -2226,7 +2226,7 @@
{
// check if destination is ok ...
KDE_struct_stat buff;
- QByteArray sDest( QFile::encodeName(sCopyFile) );
+ const QByteArray sDest( QFile::encodeName(sCopyFile) );
bool bDestExists = (KDE_stat( sDest.data(), &buff ) != -1);
if(bDestExists)
{ if(S_ISDIR(buff.st_mode))
@@ -2242,7 +2242,7 @@
}
// do we have a ".part" file?
- QByteArray sPart = QFile::encodeName(sCopyFile + ".part");
+ const QByteArray sPart = QFile::encodeName(sCopyFile + ".part");
bool bResume = false;
bool bPartExists = (KDE_stat( sPart.data(), &buff ) != -1);
bool bMarkPartial = config()->readEntry("MarkPartial", true);
@@ -2308,6 +2308,7 @@
iError = ERR_COULD_NOT_WRITE;
iRes = statusClientError;
}
+ iCopyFile = -1;
// handle renaming or deletion of a partial file ...
if(bMarkPartial)
More information about the Kde-windows
mailing list