Skip to content

Commit

Permalink
Network|Client: Server version check for remote repository
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Oct 22, 2017
1 parent 6b94a09 commit acb7bc4
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions doomsday/apps/client/src/network/packagedownloader.cpp
Expand Up @@ -237,12 +237,18 @@ bool PackageDownloader::isCancelled() const

void PackageDownloader::mountFileRepository(shell::ServerInfo const &info)
{
d->fileRepository = info.address().asText();
d->isCancelled = false;
FS::get().makeFolderWithFeed
(PATH_REMOTE_SERVER,
RemoteFeedRelay::get().addServerRepository(d->fileRepository, PATH_SERVER_REPOSITORY_ROOT),
Folder::PopulateAsyncFullTree);
// The remote repository feature was added in 2.1. Trying to send a RemoteFeed
// request to an older server would just result in us getting immediately
// disconnected.
if (info.version() > Version(2, 1, 0, 2484))
{
d->fileRepository = info.address().asText();
d->isCancelled = false;
FS::get().makeFolderWithFeed
(PATH_REMOTE_SERVER,
RemoteFeedRelay::get().addServerRepository(d->fileRepository, PATH_SERVER_REPOSITORY_ROOT),
Folder::PopulateAsyncFullTree);
}
}

void PackageDownloader::unmountFileRepository()
Expand Down

0 comments on commit acb7bc4

Please sign in to comment.