边缘世界 RimWorld

边缘世界 RimWorld

Preemptive Strike 1.6
disarmer 9 月 22 日 下午 5:14
Raids broken on linux
Mod trying to write log at any raid, but with wrong path separators: https://gist.github.com/disarmer/bc5decb491159d4882966cb0d8bb8649

On linux, valid path separator is slash(/), not backslash(\). Mod trying write "/home/user\Mods\PES.log", unable to do it and raid fails.
Anyway, home dir isn't valid place for log. It would be nice to be able disable log completely
< >
正在显示第 1 - 2 条,共 2 条留言
Just  [开发者] 9 月 24 日 下午 9:14 
引用自 disarmer
Mod trying to write log at any raid, but with wrong path separators: https://gist.github.com/disarmer/bc5decb491159d4882966cb0d8bb8649

On linux, valid path separator is slash(/), not backslash(\). Mod trying write "/home/user\Mods\PES.log", unable to do it and raid fails.
Anyway, home dir isn't valid place for log. It would be nice to be able disable log completely
I replaced the separator by system-dependent one.

The location I use is the following:
static readonly string logFile = Path.Combine(@Environment.CurrentDirectory, "Mods", "PES.log");

So, the "@Environment.CurrentDirectory" is evaluated as "/home/user" for linux users? hmm...

Do I understand you correctly, that even with disabled "debug" option in the settings your get this error?
最后由 Just 编辑于; 9 月 24 日 下午 9:30
disarmer 9 月 28 日 上午 2:42 
Seems is was fixed, thanks.

> So, the "@Environment.CurrentDirectory" is evaluated as "/home/user" for linux users?

yes, one can run app from any directory, /home/user is default working directory

> that even with disabled "debug" option in the settings your get this error?

yes. It still writing regardless this option
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50