From fdf0ecc9ef43bb52c5237350668500074bbef501 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Sat, 1 Jun 2024 07:25:51 +0300 Subject: [PATCH] feat: add is default path --- Endpoint/Common/Services/PathBuilder.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Endpoint/Common/Services/PathBuilder.cs b/Endpoint/Common/Services/PathBuilder.cs index 7df60d8..799f582 100644 --- a/Endpoint/Common/Services/PathBuilder.cs +++ b/Endpoint/Common/Services/PathBuilder.cs @@ -6,6 +6,7 @@ namespace Mirea.Api.Endpoint.Common.Services; public static class PathBuilder { + public static bool IsDefaultPath => Environment.GetEnvironmentVariable("PATH_TO_SAVE") == null; public static string PathToSave => Environment.GetEnvironmentVariable("PATH_TO_SAVE") ?? Directory.GetCurrentDirectory(); public static string Combine(params string[] paths) => Path.Combine([.. paths.Prepend(PathToSave)]); } \ No newline at end of file