summaryrefslogtreecommitdiff
path: root/cli/util/fs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/util/fs.rs')
-rw-r--r--cli/util/fs.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/util/fs.rs b/cli/util/fs.rs
index ba55eb89d..92820ebe8 100644
--- a/cli/util/fs.rs
+++ b/cli/util/fs.rs
@@ -676,7 +676,9 @@ impl Drop for LaxSingleProcessFsFlagInner {
/// This should only be used in places where it's ideal for multiple
/// processes to not update something on the file system at the same time,
/// but it's not that big of a deal.
-pub struct LaxSingleProcessFsFlag(Option<LaxSingleProcessFsFlagInner>);
+pub struct LaxSingleProcessFsFlag(
+ #[allow(dead_code)] Option<LaxSingleProcessFsFlagInner>,
+);
impl LaxSingleProcessFsFlag {
pub async fn lock(file_path: PathBuf, long_wait_message: &str) -> Self {
@@ -688,6 +690,7 @@ impl LaxSingleProcessFsFlag {
.read(true)
.write(true)
.create(true)
+ .truncate(false)
.open(&file_path);
match open_result {