···11use crc32fast::Hasher;
22-use fs2::FileExt;
32use memmap2::Mmap;
43use std::borrow::Cow;
54use std::collections::BTreeMap;
···190189 ///
191190 /// Must be called after add/remove operations to make changes persistent.
192191 pub fn save(&mut self) -> io::Result<()> {
193193- self.file.lock_exclusive()?;
192192+ self.file.lock()?;
194193 self.file.seek(SeekFrom::Start(self.data_end))?;
195194 let index_start = self.data_end;
196195···235234 .truncate(true)
236235 .open(&temp_path)?;
237236238238- temp_file.lock_exclusive()?;
237237+ temp_file.lock()?;
239238 temp_file.write_all(BNDL_MAGIC)?;
240239 let mut current_offset = HEADER_SIZE as u64;
241240···272271 temp_file.sync_all()?;
273272274273 // Acquire exclusive lock just before rename to prevent concurrent access
275275- self.file.lock_exclusive()?;
274274+ self.file.lock()?;
276275277276 // Release locks and close current file
278277 drop(self.mmap.take());
···511510 ///
512511 /// The writer must be closed and then [`save()`](Bindle::save) must be called to commit the entry.
513512 pub fn writer<'a>(&'a mut self, name: &str, compress: Compress) -> io::Result<Writer<'a>> {
514514- self.file.lock_exclusive()?;
513513+ self.file.lock()?;
515514 // Only seek if not already at the correct position
516515 let current_pos = self.file.stream_position()?;
517516 if current_pos != self.data_end {