瀏覽代碼

Bug fix: Logged responses to S3 PUT when creating directory right after querying the respective bucket region and endpoint were concatenated

Source commit: 520c60dbf8ac9293440f17a000cf32487951059d
Martin Prikryl 4 年之前
父節點
當前提交
3aabeef782
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      source/core/S3FileSystem.cpp

+ 3 - 3
source/core/S3FileSystem.cpp

@@ -1295,15 +1295,15 @@ void __fastcall TS3FileSystem::CreateDirectory(const UnicodeString & ADirName, b
   }
   }
   else
   else
   {
   {
-    TLibS3CallbackData Data;
-    RequestInit(Data);
-
     Key = GetFolderKey(Key);
     Key = GetFolderKey(Key);
 
 
     TLibS3BucketContext BucketContext = GetBucketContext(BucketName, Key);
     TLibS3BucketContext BucketContext = GetBucketContext(BucketName, Key);
 
 
     S3PutObjectHandler PutObjectHandler = { CreateResponseHandler(), NULL };
     S3PutObjectHandler PutObjectHandler = { CreateResponseHandler(), NULL };
 
 
+    TLibS3CallbackData Data;
+    RequestInit(Data);
+
     S3_put_object(&BucketContext, StrToS3(Key), 0, NULL, FRequestContext, FTimeout, &PutObjectHandler, &Data);
     S3_put_object(&BucketContext, StrToS3(Key), 0, NULL, FRequestContext, FTimeout, &PutObjectHandler, &Data);
 
 
     CheckLibS3Error(Data);
     CheckLibS3Error(Data);