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

Bug in uninstall code #136

Open
FredrikLindgren opened this issue Mar 9, 2019 · 1 comment
Open

Bug in uninstall code #136

FredrikLindgren opened this issue Mar 9, 2019 · 1 comment
Labels

Comments

@FredrikLindgren
Copy link
Member

Simplest way to reproduce is to have HANDLE_AUDIO process two identical sets of audio files in two different components, like in the Xan mod (components 0 and 6).

After installing both components, the first component's WAV file will be located in the second component's backup dir. The second component will have WAV files in its audio dir and in the override.

Uninstallation of the second component is supposed to delete the WAV files in the override and in the audio dir and restore the first component's WAV to the override. What instead happens is that while supposedly deleting the WAV in the audio dir, the conditional at line 353 kicks in. This results in the backed-up file being "restored" to the audio dir. It is then unavailable when it's supposed to be restored to the override. The first component is effectively broken until reinstalled, since its WAV is not located in the override like it should be.

@FredrikLindgren
Copy link
Member Author

A simpler test case

BEGIN test

MKDIR ~%MOD_FOLDER%/foo~
COPY ~.../fl#inlined/null.file~ ~%MOD_FOLDER%/foo/fl#test~
  INSERT_BYTES 0 1

COPY ~%MOD_FOLDER%/foo/fl#test~ override

BEGIN test2

MKDIR ~%MOD_FOLDER%/bar~
COPY ~.../fl#inlined/null.file~ ~%MOD_FOLDER%/bar/fl#test~
  INSERT_BYTES 0 2

COPY ~%MOD_FOLDER%/bar/fl#test~ override

It requires a bit of clean-up.
Before reinstallation: find test -iname fl#test -exec rm {} \; assuming the mod dir is called test

While installed:
test/foo/fl#test - 1 byte
test/bar/fl#test - 2 bytes
override/fl#test - 2 bytes
test/backup/1/fl#test - 1 byte

Uninstall the second component
test/foo/fl#test - unchanged
test/bar/fl#test - 1 byte (not expected)
override/fl#test - missing (not expected)
test/backup/1/fl#test - missing (as expected)

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

No branches or pull requests

1 participant