diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-17 23:02:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-17 23:03:12 +0300 |
commit | 264b4ac363addea7b6d570fa953acff3df692682 (patch) | |
tree | 055a69ebcc601027345c9bf66a12b6450d5248b3 /src/fs/virtfs/fs.cpp | |
parent | cda39ec9d6a0b5fab2c009046cf3570ab90db20b (diff) | |
download | mv-264b4ac363addea7b6d570fa953acff3df692682.tar.gz mv-264b4ac363addea7b6d570fa953acff3df692682.tar.bz2 mv-264b4ac363addea7b6d570fa953acff3df692682.tar.xz mv-264b4ac363addea7b6d570fa953acff3df692682.zip |
Show in mount / unmount messages info about subDir if it present.
Diffstat (limited to 'src/fs/virtfs/fs.cpp')
-rw-r--r-- | src/fs/virtfs/fs.cpp | 35 |
1 files changed, 29 insertions, 6 deletions
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<DirEntry*>( 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<ZipEntry*>( 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; |