Skip to content
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

VOXEDIT: Permission issues when installed in Program Files directory #518

Closed
Metadorius opened this issue Sep 15, 2024 · 4 comments
Closed
Labels
bug OS: Windows Microsoft Windows

Comments

@Metadorius
Copy link

Metadorius commented Sep 15, 2024

When opening a custom .pal file, this is what gets produced:

Failed to get file attributes for unitsno.pal: No such file or directory
Failed to get file attributes for unitsno.pal.png: No such file or directory
Failed to get file attributes for unittem.pal: No such file or directory
Failed to get file attributes for unittem.pal.png: No such file or directory
Failed to get file attributes for uniturb.pal: No such file or directory
Failed to get file attributes for uniturb.pal.png: No such file or directory
Found 6 entries in D:/Apps/vxlseiii14x.r583/palettes/RA2
Failed to get file attributes for unitsno.pal: No such file or directory
Failed to get file attributes for unitsno.pal.png: No such file or directory
Failed to get file attributes for unittem.pal: No such file or directory
Failed to get file attributes for unittem.pal.png: No such file or directory
Failed to get file attributes for uniturb.pal: No such file or directory
Failed to get file attributes for uniturb.pal.png: No such file or directory
Failed to access C:/Users/Rius/AppData/Roaming/vengi/voxedit/D:/Apps/vxlseiii14x.r583/palettes/RA2/unittem.pal: Invalid argument
Failed to access C:/Program Files/vengi/voxedit/D:/Apps/vxlseiii14x.r583/palettes/RA2/unittem.pal: Invalid argument
Failed to access scripts/D:/Apps/vxlseiii14x.r583/palettes/RA2/unittem.pal: Invalid argument
Failed to access C:/Users/Rius/AppData/Roaming/vengi/voxedit/scripts/D:/Apps/vxlseiii14x.r583/palettes/RA2/unittem.pal: Invalid argument
Failed to access C:/Program Files/vengi/voxedit/scripts/D:/Apps/vxlseiii14x.r583/palettes/RA2/unittem.pal: Invalid argument
loading file 'D:/Apps/vxlseiii14x.r583/palettes/RA2/unittem.pal'
File doesn't have the expected magic number
Failed to access palette-unittem.png: No such file or directory
Use absolute path to open file palette-unittem.png for writing
path: 'palette-unittem.png' (mode: 4): Couldn't open palette-unittem.png
Failed to open file palette-unittem.png for writing
Found 4 entries in C:/Users/Rius/AppData/Roaming/vengi/voxedit/
Found 28 entries in scripts/
Found 8 entries in C:/Program Files/vengi/voxedit
Failed to access unittem: No such file or directory
Failed to access C:/Users/Rius/AppData/Roaming/vengi/voxedit/unittem: No such file or directory
Failed to access C:/Program Files/vengi/voxedit/unittem: No such file or directory
Failed to access scripts/unittem: No such file or directory
Failed to access C:/Users/Rius/AppData/Roaming/vengi/voxedit/scripts/unittem: No such file or directory
Failed to access C:/Program Files/vengi/voxedit/scripts/unittem: No such file or directory
Failed to access unittem: No such file or directory
Use unittem from C:/Program Files/vengi/voxedit/
path: 'C:/Program Files/vengi/voxedit/unittem' (mode: 0): Couldn't open C:/Program Files/vengi/voxedit/unittem
Failed to access palette-unittem.png: No such file or directory
Failed to access C:/Users/Rius/AppData/Roaming/vengi/voxedit/palette-unittem.png: No such file or directory
Failed to access C:/Program Files/vengi/voxedit/palette-unittem.png: No such file or directory
Failed to access scripts/palette-unittem.png: No such file or directory
Failed to access C:/Users/Rius/AppData/Roaming/vengi/voxedit/scripts/palette-unittem.png: No such file or directory
Failed to access C:/Program Files/vengi/voxedit/scripts/palette-unittem.png: No such file or directory
Failed to access palette-unittem.png: No such file or directory
Use palette-unittem.png from C:/Program Files/vengi/voxedit/
path: 'C:/Program Files/vengi/voxedit/palette-unittem.png' (mode: 0): Couldn't open C:/Program Files/vengi/voxedit/palette-unittem.png
Failed to load palette file unittem

The new palette seems to be created but not imported.

@Metadorius
Copy link
Author

Hmm it seems I can't import a PNG palette either. Something's not right with permissions?

@Metadorius
Copy link
Author

Metadorius commented Sep 15, 2024

Okay, confirmed the issue. Apparently vengi doesn't want to work correctly if it's installed in Program Files. Thing is - Program Files by default is write protected, the solution for that is use user's AppData folder which is accessible for writing.

I suggest to have an internal switch between portable mode (current behavior where it writes the data in the same folder) and installed app mode (write in AppData or dotfiles/whatever the alternative is on *nix) depending on the installation path or permissions on the current folder.

@Metadorius Metadorius changed the title VOXEDIT: Can't open/import C&C format palettes VOXEDIT: Permission issues when installed in Program Files directory Sep 15, 2024
@mgerhardy mgerhardy added the bug label Sep 15, 2024
@mgerhardy
Copy link
Collaborator

Thanks for the report - weird thing is that it should exactly work like that (you can't write into any other directory as home on linux and mac, too) - need to investigate...

@mgerhardy
Copy link
Collaborator

Also see #495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug OS: Windows Microsoft Windows
Projects
None yet
Development

No branches or pull requests

2 participants