It should not crash Sigil. Sigil's plugin runner should make sure that at least one file remains at all times. The plugin runner code explicitly is supposed to detect and prevent that.
I will look at it.
The pluginrunner process can fail but nothing the plugin does should cause Sigil itself to actually crash in an unrecoverable way.
Update: The PluginRunner has a bug:
Code:
// don't allow changes to proceed if they will remove the very last xhtml/html file
if (m_xhtml_net_change < 0) {
QList<Resource *> htmlresources = m_book->GetFolderKeeper()->GetResourceListByType(Resource::HTMLResourceType);
if (htmlresources.count() + m_xhtml_net_change < 0) {
Utility::DisplayStdErrorDialog(tr("Error: Plugin Tried to Remove the Last XHTML file .. aborting changes"));
ui.statusLbl->setText(tr("Status: No Changes Made"));
m_result = "failed";
return;
}
}
The test should have been:
Code:
if (htmlresources.count() + m_xhtml_net_change <= 0) {
I will fix this in Sigil master.