VirtualBox

Ticket #12498 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

[FIXED IN SVN] IGuestSession.directoryCreateTemp() API doesn't return dir name

Reported by: rjoyce Owned by:
Priority: minor Component: guest control
Version: VirtualBox 4.3.4 Keywords:
Cc: Guest type: other
Host type: other

Description

The IGuestSession API function directoryCreateTemp() does not properly return the name of the new directory it creates. Instead, it returns the empty string. I'm testing from Java with an OS X 10.6 host and a Windows 7 guest, but the problem appears to be more general.

The problem seems to be in GuestSession::objectCreateTempInternal() in src/VBox/Main/src-client/GuestSessionImpl.cpp . It doesn't set the contents of the strName parameter anywhere -- that's where the return value (the directory name) would be propagated, if I understand correctly.

As an aside, that function interprets an empty strPath as "create a temporary directory in /tmp or equivalent", which would be a great feature to expose in the API. Unfortunately, the main function (GuestSession::DirectoryCreateTemp) explicitly guards against an empty string in aPath.

Thanks!

Change History

comment:1 Changed 4 months ago by pentagonik

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from IGuestSession.directoryCreateTemp() API doesn't return dir name to [FIXED IN SVN] IGuestSession.directoryCreateTemp() API doesn't return dir name

Thanks for the report. This will be fixed in the next upcoming maintenance version.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use