Changeset 75380 in vbox for trunk/src/VBox/Main/src-all
- Timestamp:
- Nov 9, 2018 10:25:30 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126515
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/SharedFolderImpl.cpp
r73003 r75380 46 46 bool fWritable; 47 47 bool fAutoMount; 48 const Utf8Str strAutoMountPoint; 48 49 Utf8Str strLastAccessError; 49 50 }; … … 95 96 * @param aWritable writable if true, readonly otherwise 96 97 * @param aAutoMount if auto mounted by guest true, false otherwise 98 * @param aAutoMountPoint Where the guest should try auto mount it. 97 99 * @param fFailOnError Whether to fail with an error if the shared folder path is bad. 98 100 * … … 104 106 bool aWritable, 105 107 bool aAutoMount, 108 const Utf8Str &aAutoMountPoint, 106 109 bool fFailOnError) 107 110 { … … 112 115 unconst(mMachine) = aMachine; 113 116 114 HRESULT rc = i_protectedInit(aMachine, aName, aHostPath, aWritable, aAutoMount, fFailOnError);117 HRESULT rc = i_protectedInit(aMachine, aName, aHostPath, aWritable, aAutoMount, aAutoMountPoint, fFailOnError); 115 118 116 119 /* Confirm a successful initialization when it's the case */ … … 146 149 aThat->m->fWritable, 147 150 aThat->m->fAutoMount, 151 aThat->m->strAutoMountPoint, 148 152 false /* fFailOnError */ ); 149 153 … … 166 170 * @param aHostPath full path to the shared folder on the host 167 171 * @param aWritable writable if true, readonly otherwise 172 * @param aAutoMountPoint Where the guest should try auto mount it. 168 173 * @param fFailOnError Whether to fail with an error if the shared folder path is bad. 169 174 * … … 175 180 bool aWritable, 176 181 bool aAutoMount, 182 const Utf8Str &aAutoMountPoint 177 183 bool fFailOnError) 178 184 { … … 183 189 unconst(mVirtualBox) = aVirtualBox; 184 190 185 HRESULT rc = protectedInit(aVirtualBox, aName, aHostPath, aWritable, aAutoMount );191 HRESULT rc = protectedInit(aVirtualBox, aName, aHostPath, aWritable, aAutoMount, aAutoMountPoint, fFailOnError); 186 192 187 193 /* Confirm a successful initialization when it's the case */ … … 205 211 * @param aHostPath full path to the shared folder on the host 206 212 * @param aWritable writable if true, readonly otherwise 213 * @param aAutoMountPoint Where the guest should try auto mount it. 207 214 * @param fFailOnError Whether to fail with an error if the shared folder path is bad. 208 215 * … … 214 221 bool aWritable, 215 222 bool aAutoMount, 223 const Utf8Str &aAutoMountPoint, 216 224 bool fFailOnError) 217 225 { … … 222 230 unconst(mConsole) = aConsole; 223 231 224 HRESULT rc = i_protectedInit(aConsole, aName, aHostPath, aWritable, aAutoMount, fFailOnError);232 HRESULT rc = i_protectedInit(aConsole, aName, aHostPath, aWritable, aAutoMount, aAutoMountPoint, fFailOnError); 225 233 226 234 /* Confirm a successful initialization when it's the case */ … … 243 251 bool aWritable, 244 252 bool aAutoMount, 253 const Utf8Str &aAutoMountPoint, 245 254 bool fFailOnError) 246 255 { … … 260 269 * accept both the slashified paths and not. */ 261 270 #if defined (RT_OS_OS2) || defined (RT_OS_WINDOWS) 262 if ( hostPathLen > 2 &&263 RTPATH_IS_SEP (hostPath.c_str()[hostPathLen - 1]) &&264 RTPATH_IS_VOLSEP(hostPath.c_str()[hostPathLen - 2]))271 if ( hostPathLen > 2 272 && RTPATH_IS_SEP(hostPath.c_str()[hostPathLen - 1]) 273 && RTPATH_IS_VOLSEP(hostPath.c_str()[hostPathLen - 2])) 265 274 ; 266 275 #else … … 292 301 m->fWritable = aWritable; 293 302 m->fAutoMount = aAutoMount; 303 unconst(m->strAutoMountPoint) = aAutoMountPoint; 294 304 295 305 return S_OK; … … 385 395 } 386 396 397 HRESULT SharedFolder::getAutoMountPoint(com::Utf8Str &aAutoMountPoint) 398 { 399 /* strAutoMountPoint is constant during life time, no need to lock. */ 400 aAutoMountPoint = m->strAutoMountPoint; 401 return S_OK; 402 } 403 404 387 405 HRESULT SharedFolder::getLastAccessError(com::Utf8Str &aLastAccessError) 388 406 { … … 415 433 } 416 434 435 const Utf8Str &SharedFolder::i_getAutoMountPoint() const 436 { 437 return m->strAutoMountPoint; 438 } 439 417 440 /* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note:
See TracChangeset
for help on using the changeset viewer.