mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 15:41:13 +02:00
2023-04-12 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDUpload::createDestinationDirs()' method. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -76,6 +76,7 @@ RDUpload::RDUpload(RDConfig *c,QObject *parent)
|
||||
: RDTransfer(c,parent)
|
||||
{
|
||||
conv_aborting=false;
|
||||
conv_create_dst_dirs=false;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +107,12 @@ void RDUpload::setDestinationUrl(const QString &url)
|
||||
}
|
||||
|
||||
|
||||
void RDUpload::createDestinationDirs(bool state)
|
||||
{
|
||||
conv_create_dst_dirs=state;
|
||||
}
|
||||
|
||||
|
||||
int RDUpload::totalSteps() const
|
||||
{
|
||||
return conv_src_size;
|
||||
@@ -178,6 +185,14 @@ RDUpload::ErrorCode RDUpload::runUpload(const QString &username,
|
||||
}
|
||||
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYHOST,0); // Don't verify host key
|
||||
|
||||
//
|
||||
// Create any needed target directories
|
||||
//
|
||||
if(conv_create_dst_dirs) {
|
||||
curl_easy_setopt(curl,CURLOPT_FTP_CREATE_MISSING_DIRS,
|
||||
CURLFTP_CREATE_DIR_RETRY);
|
||||
}
|
||||
|
||||
//
|
||||
// Transfer Parameters
|
||||
//
|
||||
|
@@ -39,6 +39,7 @@ class RDUpload : public RDTransfer
|
||||
QStringList supportedSchemes() const;
|
||||
void setSourceFile(const QString &filename);
|
||||
void setDestinationUrl(const QString &url);
|
||||
void createDestinationDirs(bool state);
|
||||
int totalSteps() const;
|
||||
RDUpload::ErrorCode runUpload(const QString &username,
|
||||
const QString &password,
|
||||
@@ -62,6 +63,7 @@ class RDUpload : public RDTransfer
|
||||
double ulnow);
|
||||
QString conv_src_filename;
|
||||
QUrl conv_dst_url;
|
||||
bool conv_create_dst_dirs;
|
||||
bool conv_aborting;
|
||||
uint conv_src_size;
|
||||
};
|
||||
|
Reference in New Issue
Block a user