diff --git a/retroshare-gui/src/gui/RetroShareLink.cpp b/retroshare-gui/src/gui/RetroShareLink.cpp index 8827b5f7a..d303a0c8f 100644 --- a/retroshare-gui/src/gui/RetroShareLink.cpp +++ b/retroshare-gui/src/gui/RetroShareLink.cpp @@ -1060,7 +1060,17 @@ static void processList(const QStringList &list, const QString &textSingular, co srcIds.push_back((*it).peerId) ; } - if (rsFiles->FileRequest(link.name().toUtf8().constData(), link.hash().toStdString(), link.size(), "", RS_FILE_REQ_ANONYMOUS_ROUTING, srcIds)) { + QString cleanname = link.name() ; + bool bad_chars = false ; + + for(uint32_t i=0;iFileRequest(cleanname.toUtf8().constData(), link.hash().toStdString(), link.size(), "", RS_FILE_REQ_ANONYMOUS_ROUTING, srcIds)) { fileAdded.append(link.name()); } else { fileExist.append(link.name()); @@ -1337,6 +1347,8 @@ static void processList(const QStringList &list, const QString &textSingular, co result += QString("
%1: %2").arg(QObject::tr("Invalid links")).arg(countInvalid); } } + if(flag & RSLINK_PROCESS_NOTIFY_BAD_CHARS) + result += QString("
%1").arg(QObject::tr("Warning: '/' and '\\' characters in some of the\nabove filenames will be replaced by '_'.")) ; if (result.isEmpty() == false) { QMessageBox mb(QObject::tr("Result"), "" + result + "", QMessageBox::Information, QMessageBox::Ok, 0, 0); @@ -1344,6 +1356,7 @@ static void processList(const QStringList &list, const QString &textSingular, co mb.exec(); } + return 0; } diff --git a/retroshare-gui/src/gui/RetroShareLink.h b/retroshare-gui/src/gui/RetroShareLink.h index dfc706c39..dbab8ba86 100644 --- a/retroshare-gui/src/gui/RetroShareLink.h +++ b/retroshare-gui/src/gui/RetroShareLink.h @@ -37,9 +37,10 @@ #include #include -#define RSLINK_PROCESS_NOTIFY_SUCCESS 1 // notify on success -#define RSLINK_PROCESS_NOTIFY_ERROR 2 // notify on error -#define RSLINK_PROCESS_NOTIFY_ASK 4 // ask for add the links +#define RSLINK_PROCESS_NOTIFY_SUCCESS 1 // notify on success +#define RSLINK_PROCESS_NOTIFY_ERROR 2 // notify on error +#define RSLINK_PROCESS_NOTIFY_ASK 4 // ask for add the links +#define RSLINK_PROCESS_NOTIFY_BAD_CHARS 8 // / or \\ characters in a filename #define RSLINK_PROCESS_NOTIFY_ALL -1