Skip to content

Commit

Permalink
VOXEDIT: fixed issue #518 (write permission in program files)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Jul 30, 2024
1 parent d028664 commit 1255beb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tools/voxedit/modules/voxedit-util/SceneManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ bool SceneManager::importPalette(const core::String& file, bool setActive, bool

core::String paletteName(core::string::extractFilename(file));
const core::String &paletteFilename = core::string::format("palette-%s.png", paletteName.c_str());
if (palette.save(paletteFilename.c_str())) {
const io::FilePtr &pngFile = _filesystem->open(paletteFilename, io::FileMode::Write);
if (palette.save(pngFile->name().c_str())) {
core::Var::getSafe(cfg::VoxEditLastPalette)->setVal(paletteName);
}

Expand Down

0 comments on commit 1255beb

Please sign in to comment.