Browse Source

Bug fix: A workspace session opened from a stored site could not be used for operation in a new window

Source commit: 0936286fad019b579fc3eabd8673aae8de005c39
Martin Prikryl 4 years ago
parent
commit
a0df54980f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      source/forms/CustomScpExplorer.cpp

+ 3 - 1
source/forms/CustomScpExplorer.cpp

@@ -6177,8 +6177,10 @@ TSessionData * __fastcall TCustomScpExplorerForm::CloneCurrentSessionData()
     // Particularly for "Workspace/XXXX" name, we need to reset it, as it would become user-visible
     // once IsWorkspace is cleared
     SessionData->Name = UnicodeString();
-    SessionData->IsWorkspace = false;
   }
+  // Most uses of this method ends with saving the session, and we do not want to store the IsWorkspace flag.
+  // Particularly, with SaveHiddenDuplicateSession, it won't work as TSessionData::ParseUrl explicitly ignored workspace sessions.
+  SessionData->IsWorkspace = false;
   return SessionData.release();
 }
 //---------------------------------------------------------------------------