PhantomGamers/SFP

SFP sometimes injects wrong file

PhantomGamers opened this issue · 2 comments

There's some race condition with the relative skin directory detection logic that, in rare cases, causes the injected file to be in the steamui root even if a custom skin folder is selected.

var relativeSkinDir = Steam.GetRelativeSkinDir().Replace('\\', '/');
if (!string.IsNullOrWhiteSpace(relativeSkinDir))
{
relativeSkinDir += '/';
}
var resourceType = fileRelativePath.EndsWith(".css") ? "css" : "js";
fileRelativePath = $"{relativeSkinDir}{fileRelativePath}";

This happens very rarely so it's hard to debug, and in the cases that it happens, if JS and CSS are both enabled it'll usually only be one that has the incorrect link.

this isn't 100% fixed

I'm not certain if this is an actual issue or if every time I have run into this it has been because of rider having some older version of SFP running in the background, so this might just not be a problem hm