mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-22 04:27:19 +01:00
Check wrong .dme before .dme exists
This commit is contained in:
@@ -607,12 +607,12 @@ namespace Tgstation.Server.Host.Components.Deployment
|
||||
else
|
||||
{
|
||||
var targetDme = ioManager.ConcatPath(outputDirectory, String.Join('.', job.DmeName, DmeExtension));
|
||||
if (!await ioManager.PathIsChildOf(outputDirectory, targetDme, cancellationToken))
|
||||
throw new JobException(ErrorCode.DeploymentWrongDme);
|
||||
|
||||
var targetDmeExists = await ioManager.FileExists(targetDme, cancellationToken);
|
||||
if (!targetDmeExists)
|
||||
throw new JobException(ErrorCode.DeploymentMissingDme);
|
||||
|
||||
if (!await ioManager.PathIsChildOf(outputDirectory, targetDme, cancellationToken))
|
||||
throw new JobException(ErrorCode.DeploymentWrongDme);
|
||||
}
|
||||
|
||||
logger.LogDebug("Selected \"{dmeName}.dme\" for compilation!", job.DmeName);
|
||||
|
||||
Reference in New Issue
Block a user