Closed CodyNinja1 closed 1 month ago
the source of the mixed slashes usually comes from the fact that the IO::From
functions return absolute paths with backslashes instead of forwardslashes
I can't reproduce this. This works fine for me:
void Main()
{
auto req = Net::HttpGet("https://example.org/");
while (!req.Finished()) {
yield();
}
string path = IO::FromStorageFolder("test/foo.txt");
req.SaveToFile(path);
print("Done: " + path);
}
Note that I had to make the test
folder myself first. Is that maybe the problem you're running into?
In my use case, which is downloading packs into the Packs folder, the Packs folder in Documents/Maniaplanet/Packs/
always exists. Might be a wine/proton related issue since I am running maniaplanet on steam via proton?
That's definitely possible. I don't have a Linux machine to test this right now, unfortunately.
I do have a windows machine, I will test this shortly.
Sorry I got a bit sidetracked and forgot to report what happened on windows, the issue for me seems to be non-existent there.
e.g. when calling
request.SaveToFile("C:/Users/user/Documents/Maniaplanet\\Packs\\file.txt")
the file downloaded from therequest
doesn't save