diff --git a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp index d0b4d5fc7..aa9b50298 100644 --- a/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp @@ -2244,6 +2244,10 @@ void TransfersDialog::chunkStreaming() } void TransfersDialog::chunkRandom() { +#ifdef WINDOWS_SYS + if(QMessageBox::Yes != QMessageBox::warning(nullptr,tr("Warning"),tr("On Windows systems, writing in the middle of large empty files may hang the software for several seconds. Do you want to use this option anyway?"),QMessageBox::Yes,QMessageBox::No)) + return; +#endif setChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ; } void TransfersDialog::chunkProgressive() diff --git a/retroshare-gui/src/gui/settings/TransferPage.cpp b/retroshare-gui/src/gui/settings/TransferPage.cpp index 4b704ddd3..dfd8944a2 100644 --- a/retroshare-gui/src/gui/settings/TransferPage.cpp +++ b/retroshare-gui/src/gui/settings/TransferPage.cpp @@ -30,6 +30,7 @@ #include "retroshare/rspeers.h" #include +#include #include #include @@ -214,11 +215,19 @@ void TransferPage::updateDefaultStrategy(int i) case 0: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_STREAMING) ; break ; - case 2: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ; - break ; + case 2: +#ifdef WINDOWS_SYS + if(QMessageBox::Yes != QMessageBox::warning(nullptr,tr("Warning"),tr("On Windows systems, randomly writing in the middle of large empty files may hang the software for several seconds. Do you want to use this option anyway?"),QMessageBox::Yes,QMessageBox::No)) + { + ui._defaultStrategy_CB->setCurrentIndex(0); + return; + } +#endif + rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ; + break ; case 1: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_PROGRESSIVE) ; - break ; + break ; default: ; } } diff --git a/retroshare-gui/src/gui/settings/TransferPage.ui b/retroshare-gui/src/gui/settings/TransferPage.ui index 7ab2b9493..fc2b17b91 100644 --- a/retroshare-gui/src/gui/settings/TransferPage.ui +++ b/retroshare-gui/src/gui/settings/TransferPage.ui @@ -30,7 +30,7 @@ - Edit Share + Configure shared directories