Open GarnetSunset opened 7 months ago
This is an issue I get for GOG games on the launcher as well. I think its an issue with how heroic may launch the process, as when I try to upload my cloud save for cyberpunk using heroic, it gives me the following error
Start-Process : A positional parameter cannot be found that accepts argument '%userprofile%\Saved'.
At line:1 char:1
+ Start-Process "`"%localappdata%\Programs\heroic\resources ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
The path for my save game is in %userprofile%\Saved Games\CD Project Red\Cyberpunk 2077
which suggests heroic is not handling spaces in folders/filenames correctly when passing arguments to other processes. Cyberpunk naturally saves games here, but I also have other games I move to this location, and create junctions for in my Documents (that I set the hidden attribute to), as this helps keep my documents folder relatively clean, and full of files I want specifically there. I only bring up this point, as this may cause issues with cloud saves for any other game even if they normally save in Documents, and may be worth checking to ensure all passed arguments to other processes are correctly escaped.
Starting Heroic.exe with Powershell then attempting a save sync, I was able to derive and alter the ps command to work with cyberpunk.
Start-Process -NoNewWindow -Wait -FilePath "$env:USERPROFILE\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\gogdl.exe" -ArgumentList "--auth-config-path", "`"$env:USERPROFILE\AppData\Roaming\heroic\gog_store\auth.json`"", "save-sync", "`"$env:USERPROFILE\Saved Games\CD Projekt Red\Cyberpunk 2077`"", "1423049311", "--ts", "0", "--os", "windows", "--name", "saves"
Describe the bug
Appears to be an issue of escaping, since it's throwing an error around the file directory, guessing it's an issue where the file path isn't escaped correctly. GOGDL specifically.
Add logs
Steps to reproduce
Expected behavior
It should upload the saves.
Screenshots
No response
Heroic Version
Latest Stable
System Information
Additional information
Here's the GOGDL Log: