Skip to content

Commit

Permalink
Fix filetree view for single file torrents within a folder
Browse files Browse the repository at this point in the history
  • Loading branch information
qu1ck committed Jul 18, 2023
1 parent 636d7fe commit a3591d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cachedfiletree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ export class CachedFileTree {
};
});

if (this.files.length > 1) {
if (this.files.length > 1 ||
(this.files.length > 0 && this.files[0].fullpath.startsWith((torrent.name as string) + "/"))) {
this.tree.fullpath = torrent.name;
}

Expand Down

0 comments on commit a3591d1

Please sign in to comment.