Skip to content

Commit 8acd507

Browse files
committed
Merge #766 into integration/update
2 parents a9f2221 + 90c2b8c commit 8acd507

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎crates/update/src/install.rs‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,16 +1829,18 @@ pub mod macos {
18291829
/// left by an install that ended. An install's copy times out after 10 minutes.
18301830
const OLD_STAGING_AGE: Duration = Duration::from_secs(24 * 60 * 60);
18311831

1832-
/// Removes the staging folders in `dir` whose install of `app` ended partway, with the partial
1833-
/// copies in them:
1832+
/// Removes the staging folders in `dir` of installs that ended partway, with the partial copies
1833+
/// in them:
18341834
///
18351835
/// - a folder named as [`STAGING`] describes, holding [`STAGING_MARKER`], whose process
1836-
/// `ended` says has ended. Without the marker, the folder is removed only when it is empty.
1836+
/// `ended` says has ended, whichever app that install was for. Without the marker, the
1837+
/// folder is removed only when it is empty.
18371838
/// - a folder named as [`OLD_STAGING`] describes that holds only `<app>.app` and has not
18381839
/// changed for [`OLD_STAGING_AGE`] before `now`.
18391840
///
1840-
/// Folders of this process's installs, other apps' folders and backup folders (one may hold
1841-
/// the only copy of an app) are left alone. Failures are logged and the install goes on.
1841+
/// Folders of this process's installs and of installs still running, [`OLD_STAGING`] folders
1842+
/// of other apps and backup folders (one may hold the only copy of an app) are left alone.
1843+
/// Failures are logged and the install goes on.
18421844
pub(crate) fn clear_staging(app: &App, dir: &Path, ended: impl Fn(u32) -> bool, now: std::time::SystemTime) {
18431845
let Ok(entries) = std::fs::read_dir(dir) else { return };
18441846
// Read before `ended` runs `ps`, which then lists every process that made one of them.

0 commit comments

Comments
 (0)