huiyadanli/RevokeMsgPatcher · error · Exception

备份文件不存在,还原失败!

Error message

备份文件不存在,还原失败!

What it means

AppModifier.Restore() calls BackupExists(), which checks every editor's .h.bak file exists AND its BackupFileVersion equals the current FileVersion. If any fails, it throws a plain Exception because there is no valid backup to restore from.

Source

Thrown at RevokeMsgPatcher/Modifier/AppModifier.cs:491

                        {
                            editor.Restore();
                        }
                        else
                        {
                            return false;
                        }
                    }
                    else
                    {
                        editor.Restore();
                    }
                }

                return true;
            }
            else
            {
                throw new Exception("备份文件不存在,还原失败!");
            }
        }

        public abstract void  AfterPatchSuccess();

        public abstract void AfterPatchFail();
    }
}

View on GitHub (pinned to 89cbbb3f0c)

Solutions

  1. If a patch was applied earlier, locate or recreate the matching .h.bak before restoring.
  2. Otherwise obtain a clean/original DLL and restore it manually.
  3. Disable the target app's auto-update, or re-patch after updates (which re-creates fresh backups).
Defensive patterns

Strategy: validation

Validate before calling

if (!modifier.BackupExists())
{
    MessageBox.Show("备份文件不存在或版本不匹配,无法还原。请提供原始文件或重新打补丁。");
    return;
}
modifier.Restore();

Prevention

When it happens

Trigger: Restoring when no backup was ever made (patch never ran), the .h.bak was deleted, or the app updated so BackupFileVersion != current FileVersion (treated as a missing/mismatched backup).

Common situations: Restore clicked before any patch; WeChat/QQ auto-updated so the .bak is from a different version; backup files cleaned up manually.

Related errors


AI-assisted analysis of huiyadanli/RevokeMsgPatcher@89cbbb3f0c (2026-08-13). Data as JSON: /api/errors/e956769721ae380a. Report an issue: GitHub.