mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Bug fix: When connecting disconnected session the directory might be loaded twice
Source commit: d5f71b032995b4533e8a6c34b34b7ca795cf4299
This commit is contained in:
@@ -1672,7 +1672,11 @@ void __fastcall TTerminal::Reopen(int Params)
|
||||
{
|
||||
FReadCurrentDirectoryPending = false;
|
||||
FReadDirectoryPending = false;
|
||||
FSuspendTransaction = true;
|
||||
// Not sure why we are suspeding the transaction in the first place,
|
||||
// but definitelly when set while connecting auto loaded workspace session, it causes loading the directory twice.
|
||||
// (when reconnecting lost connection, it's usually prevented by cached directory)
|
||||
// Preventing that by suspeding transaction only when there is one.
|
||||
FSuspendTransaction = (FInTransaction > 0);
|
||||
FExceptionOnFail = 0;
|
||||
// typically, we avoid reading directory, when there is operation ongoing,
|
||||
// for file list which may reference files from current directory
|
||||
|
||||
Reference in New Issue
Block a user