Skip to content

Commit

Permalink
Fixed|FS: Potential crash at disconnect from server
Browse files Browse the repository at this point in the history
Double deletion of the remote files folder.
  • Loading branch information
skyjake committed Sep 15, 2019
1 parent 5601715 commit e43a5ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doomsday/libs/core/src/filesys/remote/link.cpp
Expand Up @@ -183,7 +183,7 @@ void Link::wasDisconnected()
// Remove the local root folder.
if (Folder *root = FS::tryLocate<Folder>(d->localRootPath))
{
trash(root);
delete root; //trash(root);
}
}

Expand Down
5 changes: 3 additions & 2 deletions doomsday/libs/core/src/net/packagedownloader.cpp
Expand Up @@ -48,7 +48,7 @@ DE_PIMPL(PackageDownloader)
AssetGroup downloads;
Hash<IDownloadable *, Rangei64> downloadBytes;
std::function<void()> postDownloadCallback;
Dispatch deferred;
Dispatch deferred;

Impl(Public *i) : Base(i) {}

Expand Down Expand Up @@ -302,7 +302,8 @@ void PackageDownloader::unmountServerRepository()

if (Folder *remoteFiles = FS::tryLocate<Folder>(PATH_REMOTE_SERVER))
{
trash(remoteFiles);
// trash(remoteFiles);
delete remoteFiles;
}
}

Expand Down

0 comments on commit e43a5ce

Please sign in to comment.