3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-11-25 23:19:32 +00:00

Add documentation and improve code comments

- Added comprehensive README for NuGet build workflow
- Added detailed comments explaining the replace() function fix
- Verified all Python syntax is correct

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-16 18:22:29 +00:00
parent 9419c9a897
commit a864fbdf27
2 changed files with 96 additions and 0 deletions

View file

@ -44,6 +44,15 @@ def classify_package(f, arch):
return None
def replace(src, dst):
"""
Replace destination file with source file.
Removes the destination file if it exists, then moves the source file to the destination.
This ensures that the file is always moved, whether or not the destination exists.
Previous buggy implementation only moved when removal failed, causing files to be
deleted but not replaced when the destination already existed.
"""
try:
os.remove(dst)
except: