diff --git a/Dockerfile b/Dockerfile index 9bc6a22..ef5a784 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,11 +8,11 @@ ENV BUILDPLATFORM=${BUILDPLATFORM:-linux/amd64} RUN mkdir /appclient WORKDIR /appclient +COPY ./ . + RUN apk add --no-cache git python3 py3-pip make g++ RUN \ - echo "**** Cloning Source Code ****" && \ - git clone https://github.com/rogerfar/rdt-client.git . && \ cd client && \ echo "**** Building Code ****" && \ npm ci && \ @@ -30,9 +30,9 @@ ENV BUILDPLATFORM=${BUILDPLATFORM:-linux/amd64} RUN mkdir /appserver WORKDIR /appserver +COPY ./ . + RUN \ - echo "**** Cloning Source Code ****" && \ - git clone https://github.com/rogerfar/rdt-client.git . && \ echo "**** Building Source Code for $TARGETPLATFORM on $BUILDPLATFORM ****" && \ cd server && \ dotnet restore --no-cache RdtClient.sln && dotnet publish --no-restore -c Release -o out ; diff --git a/server/RdtClient.Service/Services/Downloaders/SymlinkDownloader.cs b/server/RdtClient.Service/Services/Downloaders/SymlinkDownloader.cs index 9739d0f..85ecef6 100644 --- a/server/RdtClient.Service/Services/Downloaders/SymlinkDownloader.cs +++ b/server/RdtClient.Service/Services/Downloaders/SymlinkDownloader.cs @@ -37,18 +37,6 @@ public class SymlinkDownloader(String uri, String destinationPath, String path) var pathWithoutFileName = path.Replace(fileName, "").TrimEnd(['\\', '/']); var searchPath = Path.Combine(rcloneMountPath, pathWithoutFileName); - List unWantedExtensions = - [ - ".zip", - ".rar", - ".tar" - ]; - - if (unWantedExtensions.Any(m => fileExtension == m)) - { - throw new($"Cant handle compressed files with symlink downloader"); - } - DownloadProgress?.Invoke(this, new() { @@ -135,6 +123,20 @@ public class SymlinkDownloader(String uri, String destinationPath, String path) throw new("Could not find file from rclone mount!"); } + + List unWantedExtensions = + [ + ".zip", + ".rar", + ".tar" + ]; + + if (unWantedExtensions.Any(m => fileExtension == m)) + { + _logger.Debug($"Ignoring file {file}; has unwanted extension"); + DownloadComplete?.Invoke(this, new()); + return file; + } _logger.Debug($"Creating symbolic link from {file} to {destinationPath}");