-
-
Notifications
You must be signed in to change notification settings - Fork 480
[Fix] Path not Writable + Disk Space Info #1575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3ab14e1
to
5d9055d
Compare
Please make this a real PR. This is way better, to tell the user why it is not writeable. I assume if the folder does not exist, it will also print out an error. Tested this PR. The warning occurs also if the path does not exist yet. We should try to find the base path and check that, instead the full path which will be created by legendary later on. E.g.: |
i wrote a function to get the existing root path. import { existsSync } from 'graceful-fs'
import { normalize } from 'path'
export function getFirstExistingParentPath(directoryPath: string): string {
let parentDirectoryPath = directoryPath
let parentDirectoryFound = existsSync(parentDirectoryPath)
while (!parentDirectoryFound) {
parentDirectoryPath = normalize(parentDirectoryPath + '/..')
parentDirectoryFound = existsSync(parentDirectoryPath)
}
return parentDirectoryPath !== '.' ? parentDirectoryPath : ''
} |
@CommandMC is this still being worked on? I think would be good to fix this before the next release. What is left to do? Do you need help testing? |
…uncher into debug/win-path-not-writable
Added two small changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some concerns.
Also if not done yet, update check-disk-space. I added a fix there, where check-disk-space fallsback to wmic if powershell was not found.
Ok, added your code now @Nocccer |
…uncher into debug/win-path-not-writable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Still think we should show the actually error in frontend. For access the path might not be writable is good but for check-disk-space we should show the actually error. E.g. du or whatever crahsed. I mean this should not happen, but better have this covered. Opinions?
Wdym @Nocccer ? |
We had the problem where someone could not install the game, because it was shown no disk space 0gb of 0gb is available. Problem was that powershell was not on path and check-disk-space returned 0gb of 0gb, throwed the error |
Can you try removing the powershell from the path and try to make heroic work? Because heroic relies on powershell for everything on windows. This issue makes no sense to me. |
Ok fair enough. Let's merge it. Btw are we already on check-disk-space 3.3.1? |
I'm not sure, I will update to latest before merging it 👍 |
Plan for this is to finally fix this error once and for all. Right now, there's just some debug output for a person to test.
Use the following Checklist if you have changed something on the Backend or Frontend: