diff options
Diffstat (limited to 'src/VBox/HostServices/SharedFolders/mappings.cpp')
| -rw-r--r-- | src/VBox/HostServices/SharedFolders/mappings.cpp | 10 |
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; |
