Ludeon Forums

RimWorld => Bugs => Topic started by: Mondkalb on July 29, 2014, 08:06:30 PM

Title: [W|0.5.496 rev18731] mixed Linux and Windows path notation
Post by: Mondkalb on July 29, 2014, 08:06:30 PM
[W|0.5.496 rev18731]

You used mixed Windows and Linux path notation style. ("\" and "/")

Example: "C:/Users/UserName/AppData/LocalLow/Ludeon Studeos/RimWorld\Screenshots\screenshot3.png"

I recognized this bug when I took a screenshot (see attachment). Although windows doesn't complain in most circumstances when mixed path notation is used this can sometimes lead to very hard trackable bugs. Since "\" is a legal character for file names in linux I suggest using the "file:///" prefix and "/"-notation in windows to be cross plattform compatible.

kind regards,
Mondkalb

PS: Using %APPDATA% directory for screenshots might not be the best choise... This folder is invisible in standard windows configuration and data which should be reachable for users are normally stored in the "Documents", "MyDocuments", "Saved Games" or "MyGames" folder (depending on the used version of windows). Although Microsoft made it completely stupidly hard to reach this folders reliably only using API they are the folders all users are familiar with.

[attachment deleted by admin: too old]
Title: Re: [W|0.5.496 rev18731] mixed Linux and Windows path notation
Post by: StorymasterQ on July 29, 2014, 11:19:00 PM
I'm under the impression that C# has a system call that returns a platform-specific path separator that would eliminate this problem. I don't have much experience in either C# nor platform-independent programming, but I'm sure this exists.