summaryrefslogtreecommitdiff
path: root/src/VBox/HostServices/SharedFolders/mappings.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/HostServices/SharedFolders/mappings.cpp
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/HostServices/SharedFolders/mappings.cpp')
-rw-r--r--src/VBox/HostServices/SharedFolders/mappings.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/VBox/HostServices/SharedFolders/mappings.cpp b/src/VBox/HostServices/SharedFolders/mappings.cpp
index 166dd049..30310909 100644
--- a/src/VBox/HostServices/SharedFolders/mappings.cpp
+++ b/src/VBox/HostServices/SharedFolders/mappings.cpp
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -191,7 +191,7 @@ void testMappingsAdd(RTTEST hTest)
* We are always executed from one specific HGCM thread. So thread safe.
*/
int vbsfMappingsAdd(PSHFLSTRING pFolderName, PSHFLSTRING pMapName,
- bool fWritable, bool fAutoMount, bool fSymlinksCreate)
+ bool fWritable, bool fAutoMount, bool fSymlinksCreate, bool fMissing)
{
unsigned i;
@@ -236,6 +236,7 @@ int vbsfMappingsAdd(PSHFLSTRING pFolderName, PSHFLSTRING pMapName,
FolderMapping[i].fWritable = fWritable;
FolderMapping[i].fAutoMount = fAutoMount;
FolderMapping[i].fSymlinksCreate = fSymlinksCreate;
+ FolderMapping[i].fMissing = fMissing;
/* Check if the host file system is case sensitive */
RTFSPROPERTIES prop;
@@ -317,6 +318,8 @@ const char* vbsfMappingsQueryHostRoot(SHFLROOT root)
{
MAPPING *pFolderMapping = vbsfMappingGetByRoot(root);
AssertReturn(pFolderMapping, NULL);
+ if (pFolderMapping->fMissing)
+ return NULL;
return pFolderMapping->pszFolderName;
}
@@ -459,7 +462,8 @@ int vbsfMappingsQueryWritable(PSHFLCLIENTDATA pClient, SHFLROOT root, bool *fWri
MAPPING *pFolderMapping = vbsfMappingGetByRoot(root);
AssertReturn(pFolderMapping, VERR_INVALID_PARAMETER);
- if (pFolderMapping->fValid == true)
+ if ( pFolderMapping->fValid
+ && !pFolderMapping->fMissing)
*fWritable = pFolderMapping->fWritable;
else
rc = VERR_FILE_NOT_FOUND;