Fixed several bugs
This commit is contained in:
parent
35f959ee26
commit
fb5b5ea831
2 changed files with 18 additions and 16 deletions
|
|
@ -8,11 +8,11 @@ ENV BUILDPLATFORM=${BUILDPLATFORM:-linux/amd64}
|
||||||
RUN mkdir /appclient
|
RUN mkdir /appclient
|
||||||
WORKDIR /appclient
|
WORKDIR /appclient
|
||||||
|
|
||||||
|
COPY ./ .
|
||||||
|
|
||||||
RUN apk add --no-cache git python3 py3-pip make g++
|
RUN apk add --no-cache git python3 py3-pip make g++
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** Cloning Source Code ****" && \
|
|
||||||
git clone https://github.com/rogerfar/rdt-client.git . && \
|
|
||||||
cd client && \
|
cd client && \
|
||||||
echo "**** Building Code ****" && \
|
echo "**** Building Code ****" && \
|
||||||
npm ci && \
|
npm ci && \
|
||||||
|
|
@ -30,9 +30,9 @@ ENV BUILDPLATFORM=${BUILDPLATFORM:-linux/amd64}
|
||||||
RUN mkdir /appserver
|
RUN mkdir /appserver
|
||||||
WORKDIR /appserver
|
WORKDIR /appserver
|
||||||
|
|
||||||
|
COPY ./ .
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** Cloning Source Code ****" && \
|
|
||||||
git clone https://github.com/rogerfar/rdt-client.git . && \
|
|
||||||
echo "**** Building Source Code for $TARGETPLATFORM on $BUILDPLATFORM ****" && \
|
echo "**** Building Source Code for $TARGETPLATFORM on $BUILDPLATFORM ****" && \
|
||||||
cd server && \
|
cd server && \
|
||||||
dotnet restore --no-cache RdtClient.sln && dotnet publish --no-restore -c Release -o out ;
|
dotnet restore --no-cache RdtClient.sln && dotnet publish --no-restore -c Release -o out ;
|
||||||
|
|
|
||||||
|
|
@ -37,18 +37,6 @@ public class SymlinkDownloader(String uri, String destinationPath, String path)
|
||||||
var pathWithoutFileName = path.Replace(fileName, "").TrimEnd(['\\', '/']);
|
var pathWithoutFileName = path.Replace(fileName, "").TrimEnd(['\\', '/']);
|
||||||
var searchPath = Path.Combine(rcloneMountPath, pathWithoutFileName);
|
var searchPath = Path.Combine(rcloneMountPath, pathWithoutFileName);
|
||||||
|
|
||||||
List<String> unWantedExtensions =
|
|
||||||
[
|
|
||||||
".zip",
|
|
||||||
".rar",
|
|
||||||
".tar"
|
|
||||||
];
|
|
||||||
|
|
||||||
if (unWantedExtensions.Any(m => fileExtension == m))
|
|
||||||
{
|
|
||||||
throw new($"Cant handle compressed files with symlink downloader");
|
|
||||||
}
|
|
||||||
|
|
||||||
DownloadProgress?.Invoke(this,
|
DownloadProgress?.Invoke(this,
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
|
|
@ -136,6 +124,20 @@ public class SymlinkDownloader(String uri, String destinationPath, String path)
|
||||||
throw new("Could not find file from rclone mount!");
|
throw new("Could not find file from rclone mount!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> 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}");
|
_logger.Debug($"Creating symbolic link from {file} to {destinationPath}");
|
||||||
|
|
||||||
var result = TryCreateSymbolicLink(file, destinationPath);
|
var result = TryCreateSymbolicLink(file, destinationPath);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue