save_schematic(): warn user if file changed externally since loading by xschem even if "no_ask_save" (no confirmation on save) is set

This commit is contained in:
stefan schippers 2026-05-05 00:44:50 +02:00
parent 8341c7beb3
commit 7e64d1560b
1 changed files with 1 additions and 1 deletions

View File

@ -3466,7 +3466,7 @@ int save_schematic(const char *schname, int fast) /* 20171020 added return value
else { /* user asks to save to same filename */
if(!stat(xctx->sch[xctx->currsch], &buf)) {
if(xctx->time_last_modify && xctx->time_last_modify != buf.st_mtime) {
tclvareval("ask_save_optional \"Schematic file: ", xctx->sch[xctx->currsch],
tclvareval("ask_save \"Schematic file: ", xctx->sch[xctx->currsch],
"\nHas been changed since opening.\nSave anyway?\" 0", NULL);
if(strcmp(tclresult(), "yes") ) return 0;
}