Index: /trunk/src/VBox/Main/include/RecordingSettingsImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/RecordingSettingsImpl.h	(revision 75417)
+++ /trunk/src/VBox/Main/include/RecordingSettingsImpl.h	(revision 75418)
@@ -56,5 +56,5 @@
     void i_applyDefaults(void);
 
-    int i_getDefaultFileName(Utf8Str &strFile);
+    int i_getDefaultFileName(Utf8Str &strFile, bool fWithFileExtension);
     bool i_canChangeSettings(void);
     void i_onSettingsChanged(void);
Index: /trunk/src/VBox/Main/src-server/RecordingScreenSettingsImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/RecordingScreenSettingsImpl.cpp	(revision 75417)
+++ /trunk/src/VBox/Main/src-server/RecordingScreenSettingsImpl.cpp	(revision 75418)
@@ -371,31 +371,31 @@
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    aFileName = m->bd->File.strName;
-
-    return S_OK;
-}
-
-HRESULT RecordingScreenSettings::setFileName(const com::Utf8Str &aFileName)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    if (!m->pParent->i_canChangeSettings())
-        return setError(E_INVALIDARG, tr("Cannot change file name while recording is enabled"));
-
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    /* Get default file name if an empty string or a single "." is passed. */
-    Utf8Str strFile(aFileName);
-    if (   strFile.isEmpty()
-        || strFile.equals("."))
-    {
-        int vrc = m->pParent->i_getDefaultFileName(strFile);
+    /* Get default file name if an empty string or a single "." is set. */
+    if (   m->bd->File.strName.isEmpty()
+        || m->bd->File.strName.equals("."))
+    {
+        int vrc = m->pParent->i_getDefaultFileName(m->bd->File.strName, true /* fWithFileExtension */);
         if (RT_FAILURE(vrc))
             return setError(E_INVALIDARG, tr("Error retrieving default file name"));
     }
 
+    aFileName = m->bd->File.strName;
+
+    return S_OK;
+}
+
+HRESULT RecordingScreenSettings::setFileName(const com::Utf8Str &aFileName)
+{
+    AutoCaller autoCaller(this);
+    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+
+    if (!m->pParent->i_canChangeSettings())
+        return setError(E_INVALIDARG, tr("Cannot change file name while recording is enabled"));
+
+    Utf8Str strFile(aFileName);
     if (!RTPathStartsWithRoot(strFile.c_str()))
         return setError(E_INVALIDARG, tr("Recording file name '%s' is not absolute"), strFile.c_str());
+
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     m->bd.backup();
@@ -817,5 +817,5 @@
         {
             if (m->bd->File.strName.isEmpty())
-                rc = m->pParent->i_getDefaultFileName(m->bd->File.strName);
+                rc = m->pParent->i_getDefaultFileName(m->bd->File.strName, true /* fWithExtension */);
             break;
         }
Index: /trunk/src/VBox/Main/src-server/RecordingSettingsImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/RecordingSettingsImpl.cpp	(revision 75417)
+++ /trunk/src/VBox/Main/src-server/RecordingSettingsImpl.cpp	(revision 75418)
@@ -566,5 +566,5 @@
  * Returns the full path to the default video capture file.
  */
-int RecordingSettings::i_getDefaultFileName(Utf8Str &strFile)
+int RecordingSettings::i_getDefaultFileName(Utf8Str &strFile, bool fWithFileExtension)
 {
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -572,5 +572,6 @@
     strFile = m->pMachine->i_getSettingsFileFull(); // path/to/machinesfolder/vmname/vmname.vbox
     strFile.stripSuffix();                          // path/to/machinesfolder/vmname/vmname
-    strFile.append(".webm");                        // path/to/machinesfolder/vmname/vmname.webm
+    if (fWithFileExtension)
+        strFile.append(".webm");                    // path/to/machinesfolder/vmname/vmname.webm
 
     return VINF_SUCCESS;
