Fixed the DownloadHelper creating ghost folders. Also don't delete the file when starting a symlink download.
Some checks failed
Docker Image CI / build (push) Has been cancelled

This commit is contained in:
Roger Far 2024-09-03 19:59:21 -06:00
parent 96bc3308f6
commit 35f959ee26
6 changed files with 13 additions and 10 deletions

View file

@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.0.86] - 2024-09-03
### Changed
- Add potential fix for BASE_PATH.
- Fixed creation of empty folders.
## [2.0.85] - 2024-09-03
### Changed
- Reverted: Prevent the creation of download folders when using symlink.

View file

@ -55,7 +55,7 @@
<a class="navbar-item" routerLink="profile"> Profile </a>
<a class="navbar-item" (click)="logout()"> Logout </a>
<hr class="navbar-divider" />
<a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.85</a>
<a href="https://github.com/rogerfar/rdt-client" target="_blank" class="navbar-item">Version 2.0.86</a>
</div>
</div>
</div>

View file

@ -1,6 +1,6 @@
{
"name": "rdt-client",
"version": "2.0.85",
"version": "2.0.86",
"description": "This is a web interface to manage your torrents on Real-Debrid.",
"main": "index.js",
"dependencies": {

View file

@ -85,11 +85,6 @@ public static class DownloadHelper
}
}
if (!Directory.Exists(torrentPath))
{
Directory.CreateDirectory(torrentPath);
}
var filePath = Path.Combine(torrentPath, fileName);
return filePath;

View file

@ -39,10 +39,13 @@ public class DownloadClient(Download download, Torrent torrent, String destinati
throw new("Invalid download path");
}
await FileHelper.Delete(filePath);
Type = torrent.DownloadClient;
if (Type != Data.Enums.DownloadClient.Symlink)
{
await FileHelper.Delete(filePath);
}
Downloader = Type switch
{
Data.Enums.DownloadClient.Internal => new InternalDownloader(download.Link, filePath),

View file

@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
<Version>2.0.85</Version>
<Version>2.0.86</Version>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>