summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/core/libimagstore/src/file_abstraction/fs.rs1
-rw-r--r--lib/core/libimagstore/src/store.rs4
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/core/libimagstore/src/file_abstraction/fs.rs b/lib/core/libimagstore/src/file_abstraction/fs.rs
index 8ee7ee9d..42314502 100644
--- a/lib/core/libimagstore/src/file_abstraction/fs.rs
+++ b/lib/core/libimagstore/src/file_abstraction/fs.rs
@@ -96,6 +96,7 @@ impl FileAbstractionInstance for FSFileAbstractionInstance {
};
*self = FSFileAbstractionInstance::File(file, path);
if let FSFileAbstractionInstance::File(ref mut f, _) = *self {
+ trace!("Writing buffer...");
return f.write_all(&buf).chain_err(|| SEK::FileNotWritten);
}
unreachable!();
diff --git a/lib/core/libimagstore/src/store.rs b/lib/core/libimagstore/src/store.rs
index 44afbea6..cefa42d7 100644
--- a/lib/core/libimagstore/src/store.rs
+++ b/lib/core/libimagstore/src/store.rs
@@ -177,6 +177,7 @@ impl StoreEntry {
fn write_entry(&mut self, entry: &Entry) -> Result<()> {
if self.is_borrowed() {
assert_eq!(self.id, entry.location);
+ trace!("Writing entry...");
self.file
.write_file_content(entry)
.map(|_| ())
@@ -442,11 +443,13 @@ impl Store {
debug!("Writing Entry");
se.write_entry(&entry.entry)?;
+ trace!("Entry written");
if modify_presence {
debug!("Modifying presence of {} -> Present", entry.get_location());
se.status = StoreEntryStatus::Present;
}
+ trace!("Entry updated successfully");
Ok(())
}
@@ -798,6 +801,7 @@ impl<'a> Drop for FileLockEntry<'a> {
use libimagerror::trace::trace_error_dbg;
trace!("Dropping: {:?} - from FileLockEntry::drop()", self.get_location());
if let Err(e) = self.store._update(self, true) {
+ trace!("Error happened in FileLockEntry::drop() while Store::update()ing");
trace_error_dbg(&e);
if_cfg_panic!("ERROR WHILE DROPPING: {:?}", e);
}