From 264b4ac363addea7b6d570fa953acff3df692682 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 17 May 2017 23:02:48 +0300 Subject: Show in mount / unmount messages info about subDir if it present. --- src/fs/virtfs/fs.cpp | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/fs/virtfs/fs.cpp b/src/fs/virtfs/fs.cpp index aa456fb4b..8a708a9fa 100644 --- a/src/fs/virtfs/fs.cpp +++ b/src/fs/virtfs/fs.cpp @@ -367,7 +367,17 @@ namespace VirtFs newDir.c_str()); return false; } - logger->log("Add virtual directory: " + newDir); + if (subDir.empty()) + { + logger->log("Add virtual directory: " + newDir); + } + else + { + logger->log("Add virtual directory: %s with dir %s", + newDir.c_str(), + subDir.c_str()); + } + addEntry(new DirEntry(newDir, rootDir, subDir, @@ -484,10 +494,19 @@ namespace VirtFs { DirEntry *const dirEntry = static_cast( entry); + if (subDir.empty()) + { logger->log("Remove virtual directory: " + oldDir); - mEntries.erase(it); - delete dirEntry; - return true; + } + else + { + logger->log("Remove virtual directory: %s with dir %s", + oldDir.c_str(), + subDir.c_str()); + } + mEntries.erase(it); + delete dirEntry; + return true; } } return false; @@ -643,7 +662,9 @@ namespace VirtFs return false; } - logger->log("Add virtual zip: " + newDir); + logger->log("Add virtual zip: %s with dir %s", + newDir.c_str(), + subDir.c_str()); addEntry(entry, append); return true; } @@ -705,7 +726,9 @@ namespace VirtFs { ZipEntry *const zipEntry = static_cast( entry); - logger->log("Remove virtual zip: " + oldDir); + logger->log("Remove virtual zip: %s with dir %s", + oldDir.c_str(), + subDir.c_str()); mEntries.erase(it); delete zipEntry; return true; -- cgit v1.2.3-70-g09d2