[TB] fix: get files from torrent name folder in TB zip
This commit is contained in:
parent
edf443adfc
commit
9525498671
1 changed files with 4 additions and 2 deletions
|
|
@ -134,13 +134,15 @@ public class UnpackClient(Download download, String destinationPath)
|
|||
var hashDir = Path.Combine(extractPath, _torrent.Hash);
|
||||
if (Directory.Exists(hashDir))
|
||||
{
|
||||
foreach (var file in Directory.GetFiles(hashDir))
|
||||
var innerFolder = Directory.GetDirectories(hashDir)[0];
|
||||
|
||||
foreach (var file in Directory.GetFiles(innerFolder))
|
||||
{
|
||||
var destFile = Path.Combine(extractPath, Path.GetFileName(file));
|
||||
File.Move(file, destFile);
|
||||
}
|
||||
|
||||
foreach (var dir in Directory.GetDirectories(hashDir))
|
||||
foreach (var dir in Directory.GetDirectories(innerFolder))
|
||||
{
|
||||
var destDir = Path.Combine(extractPath, Path.GetFileName(dir));
|
||||
Directory.Move(dir, destDir);
|
||||
|
|
|
|||
Loading…
Reference in a new issue