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/), 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). 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 ## [2.0.85] - 2024-09-03
### Changed ### Changed
- Reverted: Prevent the creation of download folders when using symlink. - 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" routerLink="profile"> Profile </a>
<a class="navbar-item" (click)="logout()"> Logout </a> <a class="navbar-item" (click)="logout()"> Logout </a>
<hr class="navbar-divider" /> <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> </div>
</div> </div>

View file

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

View file

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

View file

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

View file

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