Skip to content

Commit 9441578

Browse files
committed
Lower snapshot disk space ratio by 1 since we don't store the snapshot anymore
1 parent 37a4498 commit 9441578

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mithril-client/src/utils/unpacker.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use mithril_common::{StdError, StdResult};
1515
/// disk space is sufficient to store the archive plus the extracted files. If
1616
/// the available space is lower than that, a warning is raised. This ratio has
1717
/// been experimentally established.
18-
const FREE_SPACE_SNAPSHOT_SIZE_RATIO: f64 = 3.5;
18+
pub const FREE_SPACE_SNAPSHOT_SIZE_RATIO: f64 = 2.5;
1919

2020
/// Check and unpack a downloaded archive in a given directory.
2121
#[derive(Default)]
@@ -24,8 +24,8 @@ pub struct SnapshotUnpacker;
2424
/// Errors tied with the SnapshotUnpacker.
2525
#[derive(Debug, Error)]
2626
pub enum SnapshotUnpackerError {
27-
/// Not enough space on the disk. There should be at least 3.5 times the
28-
/// size of the archive to dowload to ensure it could be unpacked safely.
27+
/// Not enough space on the disk. There should be at least [FREE_SPACE_SNAPSHOT_SIZE_RATIO] times
28+
/// the size of the archive to download to ensure it could be unpacked safely.
2929
#[error("There is only {} remaining in directory '{}' to store and unpack a {} large archive.", human_bytes(*left_space), pathdir.display(), human_bytes(*archive_size))]
3030
NotEnoughSpace {
3131
/// Left space on device

0 commit comments

Comments
 (0)