Browse Source

WebAPI: Allow to set read-only directory as torrent location

PR #18613.
Closes #18480.
adaptive-webui-19844
Vladimir Golovnev 2 years ago committed by GitHub
parent
commit
ff0f3b4975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/webui/api/torrentscontroller.cpp

4
src/webui/api/torrentscontroller.cpp

@ -1101,10 +1101,6 @@ void TorrentsController::setLocationAction() @@ -1101,10 +1101,6 @@ void TorrentsController::setLocationAction()
if (!Utils::Fs::mkpath(newLocation))
throw APIError(APIErrorType::Conflict, tr("Cannot make save path"));
// check permissions
if (!Utils::Fs::isWritable(newLocation))
throw APIError(APIErrorType::AccessDenied, tr("Cannot write to directory"));
applyToTorrents(hashes, [newLocation](BitTorrent::Torrent *const torrent)
{
LogMsg(tr("WebUI Set location: moving \"%1\", from \"%2\" to \"%3\"")

Loading…
Cancel
Save