Repository navigation
Conversation
- 显式非空 runtime.avdDir 现在无条件优先,包括运行时目录就是默认的 <DATA_DIR>/runtime 的情况。 - 空 avdDir 仍沿用原默认:运行时目录确实在 DATA_DIR 内 -> <runtime>/avd,否则 -> <DATA_DIR>/avd。 - 把 root.toLowerCase().startsWith(DATA_DIR) 换成 path.resolve + path.relative 判断,DATA_DIR-old 这种同前缀兄弟目录、跨盘路径、大小写差异都按路径语义处理。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An explicit
runtime.avdDircan be ignored when the runtime is insideDATA_DIR. The string-prefix containment check also treats a sibling such asDATA_DIR-oldas a child.Legacy emulator snapshots are offered by the leftovers scanner as generic directories, but the generic-directory cleaner requires an
ApkStart.exe. A normal old snapshot therefore cannot be cleaned through that path. The UI also describes every skipped item as occupied and labels estimated file sizes as released disk space.Changes
apkstart.avd/snapshots. Preserve the currentapkstartsnapshot and unknown neighbours.For this change, a linked
avdHomeis intentionally skipped and preserved. This is a documented compatibility limit rather than an attempt to infer ownership through a configured link.Validation
On Windows, the final head
a74b74650e180f9b0b824b5d9592a4f96e510ebbpassed:node test/web-storage-test.js: 35 passed, including real TEMP junctions, normal cleanup, current/unknown snapshot preservation, ordinary-file rejection, scan-to-clean changes, measured bytes, partial deletion failure and duplicate accounting.The preceding integration head
07f450f0dfe45f0410cb056a810df83403d09b59passed the following acceptance checks. The final commit adds only the two failure/accounting tests; the product source is unchanged, so these earlier checks are reused:node test/run-tests.js: 9 passed.git diff --check: exit 0.The cleanup implementation is unchanged from the independently reviewed candidate
cb1aea31be8074231dd5f072a2e2da68c719710d. The integrated branch adds the separately reviewed UI feedback and the two failure/accounting tests.Cloud CI
The existing workflow passed on this exact head,
a74b74650e180f9b0b824b5d9592a4f96e510ebb, in the contributor fork: Windows CI run 44880914393.Both Windows / Node 20 and Node 22 jobs passed, including the full test command and the pointer-hook smoke test. The optional APK-fixture scenario self-skipped because no APK fixture was supplied; it is not counted as exercised.
The initial isolated local worktree could not finish
npm testbecause@napi-rs/lzmawas not installed there. That failure is retained in the review record; the clean cloud workflow installed dependencies and completed the chain.Scope
This addresses explicit AVD path selection and legacy snapshot cleanup, and is related to #104. It does not establish that every disk-usage report under that issue is resolved.
The change does not add uninstall-time data wiping, migrate existing AVDs, purge the whole data/runtime directory or run a real installation. File-size totals are logical lengths, not measured physical disk space reclaimed. Revalidation before deletion does not claim atomic protection against every concurrent path replacement by another process.