klembot / twinejs

Twine, a tool for telling interactive, nonlinear stories
https://twinery.org
GNU General Public License v3.0
2k stars 295 forks source link

Importing story with same name can duplicate existing story #697

Open HiEv opened 4 years ago

HiEv commented 4 years ago

While v2.3.9 fixed the prime causes of the weird undeletable story duplications (bugs #615, #628, #639, #644, and #665, most of which can be closed now), there is one exception. If you attempt to import a file with the same name as an existing file and then choose not to replace any files, you end up with two copies of the existing file, rather than one of the existing file and the one imported.

Steps to reproduce the problem:

  1. Create a story called "AAATest".
  2. Edit the "Default Passage" to say "Test 1".
  3. Publish that to a file.
  4. Edit the "Default Passage" to say "Test 2".
  5. Close the story and go back to the main Twine window.
  6. Click "Import from file" and import the "AAATest.html" file you just published.
  7. Choose "Don't Replace Any Stories".
  8. Go to edit any story and then go back to the main Twine window.
  9. You will now see you have two copies of the "AAATest" story with "Test 2" in the "Default Passage" passage. Editing or deleting either one will affect both copies.

Solution: Either combine the "Don't Replace Any Stories" and "Don't Import Any Stories" options into a single "Cancel" option which changes nothing, or allow Twine to have two separate copies of a story with the same name.

StoltHD commented 4 years ago

I still have problem with reoccuring Stories after deliting one copy and open the second,delite both and reimport a published file ...

the problem occure even with restarting Twine 2 desktop (v.2.3.9), also have problems with adding new versions of Formats ...

HiEv commented 4 years ago

@StoltHD - Your data in the Twine editor is corrupt. You'll need to fix that by following the steps I laid out within bug report #628.