VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Core/CoreBase.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-06-26 01:18:40 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-06-26 01:22:18 +0200
commit5fb407cffebb8ec0cc50cb3e96e1bebf79ad1bc0 (patch)
treef621b8428b6390cb7f01d64fe72a7bd6ce400d9a /src/Core/CoreBase.cpp
parent4137c5e15bf3d784f3e6a84a1268f592910f9a67 (diff)
downloadVeraCrypt-5fb407cffebb8ec0cc50cb3e96e1bebf79ad1bc0.tar.gz
VeraCrypt-5fb407cffebb8ec0cc50cb3e96e1bebf79ad1bc0.zip
Linux/MacOSX: use standard std::shared_ptr instead of our custom implementation which is kept for compatibility with older compilers. We also introduce compatibility code for old compilers that don't define std::unique_ptr
Diffstat (limited to 'src/Core/CoreBase.cpp')
-rw-r--r--src/Core/CoreBase.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Core/CoreBase.cpp b/src/Core/CoreBase.cpp
index 01d3981a..29bfb74d 100644
--- a/src/Core/CoreBase.cpp
+++ b/src/Core/CoreBase.cpp
@@ -254,7 +254,11 @@ namespace VeraCrypt
bool CoreBase::IsVolumeMounted (const VolumePath &volumePath) const
{
- return GetMountedVolume (volumePath);
+ shared_ptr<VolumeInfo> mountedVolume = GetMountedVolume (volumePath);
+ if (mountedVolume)
+ return true;
+ else
+ return false;
}
shared_ptr <Volume> CoreBase::OpenVolume (shared_ptr <VolumePath> volumePath, bool preserveTimestamps, shared_ptr <VolumePassword> password, int pim, shared_ptr<Pkcs5Kdf> kdf, bool truecryptMode, shared_ptr <KeyfileList> keyfiles, VolumeProtection::Enum protection, shared_ptr <VolumePassword> protectionPassword, int protectionPim, shared_ptr<Pkcs5Kdf> protectionKdf, shared_ptr <KeyfileList> protectionKeyfiles, bool sharedAccessAllowed, VolumeType::Enum volumeType, bool useBackupHeaders, bool partitionInSystemEncryptionScope) const