-
Notifications
You must be signed in to change notification settings - Fork 171
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
replace platform chmod with os.chmod #541
Conversation
Other than that, looks fine to me. Works as expected on windows after changing os.chown to os.chmod |
b2dccfb
to
101bf43
Compare
I don't think that should be a deal breaker considering support for Windows is unofficial at best. This happens because of a semantic difference in what "read only" means on both systems, the closest to it on Linux would be "immutable". |
While Windows support is unofficial, making a change that will leave artifacts behind (that the common user might not know how to remove) when it was previously workable seems inconsiderate to Windows users. I honestly don't like that decky-loader even unofficially supports Windows, but actively making their user experience worse sounds unappealing. Perhaps some additional considerations can be made that temporarily revert the permissions to normal so that plugins can be cleaned up/updated/etc. and then reapplied after performing the operation. It doesn't sound entirely ideal either since it would still probably be messy, but it's an idea. |
Talk about common users is irrelevant, to install Decky on Windows you already need experience since there are no installers or scripts to do it for you. For plugin removal we can simply make it writable again (as in, |
So uh, what's the point of this PR? To break stuff? I thought the point was to use something that has better interop between win and linux. There's a reason why i stubbed out windows originally, as its permissions are simply a mess. |
You could put the new implementation in the linux file, but then there's really not much point afaict, unless it's faster (or if it was more readable/maintainable, but imo it's about the same). As it is I see no point in breaking windows compatibility (which some of the devs use) for seemingly no benefit? Please explain the benefits further if you can, thanks. Edit: also, currently chmod is completely disabled (on purpose!) if decky is run as the user, because it assumes it's being managed by something else (nixos for example), which your implementation removes. |
The point was to use a pure python implementation instead of shelling out.
Its not a mess, its simply different to how unix did it. the simplest solution would be to readd the euid check
So the whole making plugins read-only to prevent tempering isn't even available everywhere? What else would be managing plugin permissions? I don't see how NixOS would do it considering plugins may be dynamically installed.
|
Decky on Windows currently always runs as an unpriviledged user. Windows is a lot more flexible in what it can do with a user account, so i don't see the need to run Decky as admin. Good point for bringing this up btw. If the read-only flag is just there for tamper protection from users, wouldn't this be a bit pointless on Windows? Explorer completely ignores it. |
I guess so, though I do recall hearing that it helps with plugins potentially messing with one another, I am unsure how likely such a scenario is. There are multiple ways I can see this continue:
|
I personally am in favor of the former option. If needs be we can re-evaluate this when decky for windows actually gets used. If anyone else on the team thinks the latter option is better, please leave a comment. |
I also agree with the former option. There is already an organizational split and at the moment, I think any solutions we do come up with would keep the same structure or litter the equivalent of |
6b32d35
to
b2a8697
Compare
b2a8697
to
082f249
Compare
Works well, thanks (sorry this one took so long to test as well) |
Please tick as appropriate:
If you're wanting to update a translation or add a new one, please use the weblate page: https://weblate.werwolv.net/projects/decky/
Description
Replaces platform specific chmod implementation with os.chmod
os.chmod is already compatible with Linux and Windows and is better at achieving the intended behavior on Windows than a noop.
Also gets rid of potential complicates with unique chmod implementations