Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WebDAV and S3 crash under some conditions #441

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/core/S3FileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,8 +1031,8 @@ void TS3FileSystem::DoStartup()
// Capabilities of S3 protocol are fixed
FTerminal->SaveCapabilities(FFileSystemInfo);
FTerminal->SetExceptionOnFail(true);
// retrieve initialize working directory to save it as home directory
ReadCurrentDirectory();
// ReadCurrentDirectory is called later as the result of setting
// FReadCurrentDirectoryPending in TTerminal::DoStartup
FTerminal->SetExceptionOnFail(false);
}

Expand All @@ -1045,7 +1045,7 @@ void TS3FileSystem::ReadCurrentDirectory()
{
if (FCachedDirectoryChange.IsEmpty())
{
// FCurrentDirectory is set later during TTerminal::DoStartup execution
FCurrentDirectory = FCurrentDirectory.IsEmpty() ? UnicodeString(L"/") : FCurrentDirectory;
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions src/core/WebDAVFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,8 @@ UnicodeString TWebDAVFileSystem::GetCurrentDirectory() const
void TWebDAVFileSystem::DoStartup()
{
FTerminal->SetExceptionOnFail(true);
// retrieve initialize working directory to save it as home directory
ReadCurrentDirectory();
// ReadCurrentDirectory is called later as the result of setting
// FReadCurrentDirectoryPending in TTerminal::DoStartup
FTerminal->SetExceptionOnFail(false);
}

Expand Down Expand Up @@ -738,7 +738,7 @@ void TWebDAVFileSystem::ReadCurrentDirectory()
{
if (FCachedDirectoryChange.IsEmpty())
{
// FCurrentDirectory is set later during TTerminal::DoStartup execution
FCurrentDirectory = FCurrentDirectory.IsEmpty() ? UnicodeString(ROOTDIRECTORY) : FCurrentDirectory;
}
else
{
Expand Down