边缘世界 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 - 4 条,共 4 条留言
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
Just  [开发者] 11 月 10 日 下午 7:33 
>yes. It still writing regardless this option
This is bad...

It is a legacy tbh. I would change the whole debugging (and I already changed a lot)...
Ah.
Just  [开发者] 11 月 10 日 下午 8:55 
引用自 disarmer
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

Okay, let me re-phrase it completely.

What you like to have? - I decided (complete change from original mod) to have very precise full log if this option is enabled.

What about allow to select the location? I have no idea how .net framework will behave in virtual environment (on linux especially), however :) Want to test? =)
最后由 Just 编辑于; 11 月 10 日 下午 8:57
< >
正在显示第 1 - 4 条,共 4 条留言
每页显示数: 1530 50