|
|
@ -23,7 +23,7 @@
|
|
|
|
// fix type conversion error josswern 23.02.2011
|
|
|
|
// fix type conversion error josswern 23.02.2011
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define KIO_FTP_PRIVATE_INCLUDE
|
|
|
|
#define TDEIO_FTP_PRIVATE_INCLUDE
|
|
|
|
#include "ftp.h"
|
|
|
|
#include "ftp.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
@ -140,14 +140,14 @@ extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); }
|
|
|
|
int kdemain( int argc, char **argv )
|
|
|
|
int kdemain( int argc, char **argv )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TDELocale::setMainCatalogue("tdelibs");
|
|
|
|
TDELocale::setMainCatalogue("tdelibs");
|
|
|
|
TDEInstance instance( "kio_ftp" );
|
|
|
|
TDEInstance instance( "tdeio_ftp" );
|
|
|
|
( void ) TDEGlobal::locale();
|
|
|
|
( void ) TDEGlobal::locale();
|
|
|
|
|
|
|
|
|
|
|
|
kdDebug(7102) << "Starting " << getpid() << endl;
|
|
|
|
kdDebug(7102) << "Starting " << getpid() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
if (argc != 4)
|
|
|
|
if (argc != 4)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fprintf(stderr, "Usage: kio_ftp protocol domain-socket1 domain-socket2\n");
|
|
|
|
fprintf(stderr, "Usage: tdeio_ftp protocol domain-socket1 domain-socket2\n");
|
|
|
|
exit(-1);
|
|
|
|
exit(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -2604,7 +2604,7 @@ Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const TQString sCop
|
|
|
|
sPart = TQFile::encodeName(sCopyFile);
|
|
|
|
sPart = TQFile::encodeName(sCopyFile);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(bPartExists && buff.st_size > 0)
|
|
|
|
else if(bPartExists && buff.st_size > 0)
|
|
|
|
{ // must not be a folder! please fix a similar bug in kio_file!!
|
|
|
|
{ // must not be a folder! please fix a similar bug in tdeio_file!!
|
|
|
|
if(S_ISDIR(buff.st_mode))
|
|
|
|
if(S_ISDIR(buff.st_mode))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
iError = ERR_DIR_ALREADY_EXIST;
|
|
|
|
iError = ERR_DIR_ALREADY_EXIST;
|
|
|
@ -2621,7 +2621,7 @@ Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const TQString sCop
|
|
|
|
if(bPartExists && !bResume) // get rid of an unwanted ".part" file
|
|
|
|
if(bPartExists && !bResume) // get rid of an unwanted ".part" file
|
|
|
|
remove(sPart.data());
|
|
|
|
remove(sPart.data());
|
|
|
|
|
|
|
|
|
|
|
|
// JPF: in kio_file overwrite disables ".part" operations. I do not believe
|
|
|
|
// JPF: in tdeio_file overwrite disables ".part" operations. I do not believe
|
|
|
|
// JPF: that this is a good behaviour!
|
|
|
|
// JPF: that this is a good behaviour!
|
|
|
|
if(bDestExists) // must delete for overwrite
|
|
|
|
if(bDestExists) // must delete for overwrite
|
|
|
|
remove(sDest.data());
|
|
|
|
remove(sDest.data());
|