summaryrefslogtreecommitdiff
path: root/src/fs/virtfs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-02 02:55:29 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-02 02:55:29 +0300
commita70addadba0be1880bc55f13701034585aa19128 (patch)
tree5412e7844cc5a08532b82e4776b4bd3c9bff4818 /src/fs/virtfs
parent38846eb9dda3b1656a0b36acb2945edf7b314fa0 (diff)
downloadmv-a70addadba0be1880bc55f13701034585aa19128.tar.gz
mv-a70addadba0be1880bc55f13701034585aa19128.tar.bz2
mv-a70addadba0be1880bc55f13701034585aa19128.tar.xz
mv-a70addadba0be1880bc55f13701034585aa19128.zip
Fix possible leaks on exit and asserts about adding non existing zips and directories.
Diffstat (limited to 'src/fs/virtfs')
-rw-r--r--src/fs/virtfs/virtfs.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fs/virtfs/virtfs.cpp b/src/fs/virtfs/virtfs.cpp
index efa50922a..1069b8f7e 100644
--- a/src/fs/virtfs/virtfs.cpp
+++ b/src/fs/virtfs/virtfs.cpp
@@ -42,6 +42,7 @@ namespace VirtFs
void init(const std::string &restrict name)
{
VirtFsDir::init(name);
+ VirtFsZip::init();
updateDirSeparator();
}
@@ -155,6 +156,14 @@ namespace VirtFs
#endif // UNITTESTS
}
+ bool addDirToSearchPathSilent(const std::string &restrict newDir,
+ const Append append)
+ {
+ return VirtFsDir::addToSearchPathSilent(newDir,
+ append,
+ SkipError_false);
+ }
+
bool removeDirFromSearchPath(const std::string &restrict oldDir)
{
#ifdef UNITTESTS
@@ -164,6 +173,11 @@ namespace VirtFs
#endif // UNITTESTS
}
+ bool removeDirFromSearchPathSilent(const std::string &restrict oldDir)
+ {
+ return VirtFsDir::removeFromSearchPathSilent(oldDir);
+ }
+
bool addZipToSearchPath(const std::string &restrict newDir,
const Append append)
{
@@ -211,6 +225,7 @@ namespace VirtFs
bool deinit()
{
VirtFsDir::deinit();
+ VirtFsZip::deinit();
return true;
}