mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
fix: revert to PID-based temp files (was working before)
Reverts the unnecessary mktemp change from638cb0afethat broke cache saving. What happened: - Original delta code used $$ (PID) for temp files: DELTA_TARBALL="/tmp/...-$$.tar.zst" - This creates a STRING, not a file - zstd creates the file when writing - When removing deltas (638cb0afe), I unnecessarily changed to mktemp for "better practice" - mktemp CREATES an empty file - zstd refuses to overwrite it - Result: "already exists; not overwritten" error Why it seemed to work: - Immutability check skipped save for existing caches - Upload code path never executed during testing - Bug only appeared when actually trying to create new cache The fix: - Revert to PID-based naming ($$) that was working - Don't fix what isn't broken Applies to both save and restore actions for consistency.
This commit is contained in:
@@ -76,7 +76,7 @@ runs:
|
||||
fi
|
||||
|
||||
# Create tarball
|
||||
BASE_TARBALL=$(mktemp /tmp/xahau-cache-XXXXXX.tar.zst)
|
||||
BASE_TARBALL="/tmp/xahau-cache-base-$$.tar.zst"
|
||||
|
||||
echo "Creating cache tarball..."
|
||||
tar -cf - -C "${TARGET_PATH}" . | zstd -3 -T0 -q -o "${BASE_TARBALL}"
|
||||
|
||||
Reference in New Issue
Block a user