Windows build doesn't run from network drive

I’m testing my game (Windows version) on different kinds of systems before I publish it, and I found that it doesn’t run from a network drive, I get the following message:

[lime.app.Preloader] ERROR: there is no asset library with an ID of “default”

I don’t think many people would have to run it that way, but I would expect it to work.

How we can test this? You made a Windows C++ build, copied the directory to a network drive, and tried to run from there?

I wonder if this affects Haxe sys.FileSystem calls

I recently ran into this problem when developing on Windows in Parallels running on my Mac. I am sharing my project directory with Windows from my Mac as a share and the following code in the lime AssetsLibrary seems to break the path.

@:noCompletion private function __resolvePath(path:String):String
{
path = StringTools.replace(path, “\\”, “/”);

The original path is " \\Mac\Projects\Haxe\openfl-glsl-samples\base-samples\bin\hl\bin\manifest/…//assets/1.png" and it gets resolved to “/Mac/Projects/Haxe/openfl-glsl-samples/base-samples/bin/hl/bin/assets/1.png”. If I simply comment out the StringTools replace line it works fine. Not sure the best way to solve this on my end. I can create an issue if that would be helpful.

One other note that potentially creates a similar problem loading images on Windows is if you don’t have the “format” library included in the project file then loading images returns null on Windows because CFFI is disabled and the format library isn’t configured.

In Image.hx the check #if (sys && format) on line 1573 causes the problem. The warn in the code below should probably include the check for format.

Thanks
Alex

Okay, so this seems to be messing up the \\ at the start, which indicates a network path on Windows.

I wonder if there should be an additional check (fenced by #if windows) to determine if the path starts with \\, and to either skip replacing all backslashes, or to only skip the ones at the beginning.