mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix hardcoded resource path preventing client from starting on Unix (#265)
* Fix hardcoded resource path preventing client from starting on Unix * also fix this unit test path * okay actually fix it because I'm dumb
This commit is contained in:
@@ -91,7 +91,7 @@ namespace SS14.Client.Resources
|
||||
{
|
||||
var cfgMgr = _configurationManager;
|
||||
|
||||
cfgMgr.RegisterCVar("res.pack", @"../../Resources/ResourcePack.zip", CVarFlags.ARCHIVE);
|
||||
cfgMgr.RegisterCVar("res.pack", Path.Combine("..","..","Resources","ResourcePack.zip"), CVarFlags.ARCHIVE);
|
||||
cfgMgr.RegisterCVar("res.password", String.Empty, CVarFlags.SERVER | CVarFlags.REPLICATED);
|
||||
|
||||
string zipPath = path ?? _configurationManager.GetCVar<string>("res.pack");
|
||||
@@ -99,9 +99,8 @@ namespace SS14.Client.Resources
|
||||
|
||||
if (AppDomain.CurrentDomain.GetAssemblyByName("SS14.UnitTesting") != null)
|
||||
{
|
||||
string debugPath = "..\\";
|
||||
debugPath += zipPath;
|
||||
zipPath = debugPath;
|
||||
string debugPath = "..";
|
||||
zipPath = Path.Combine(debugPath, zipPath);
|
||||
}
|
||||
|
||||
zipPath = PathHelpers.ExecutableRelativeFile(zipPath);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
@@ -22,7 +22,7 @@ namespace SS14.Shared.Utility
|
||||
/// </summary>
|
||||
public static string ExecutableRelativeFile(string file)
|
||||
{
|
||||
return Path.Combine(GetExecutableDirectory(), file);
|
||||
return Path.GetFullPath(Path.Combine(GetExecutableDirectory(), file));
|
||||
}
|
||||
|
||||
public static string AssemblyRelativeFile(string file, Assembly assembly)
|
||||
|
||||
Reference in New Issue
Block a user