Browse Source

Bug 1661: It is not possible to open S3 folder from command-line/URL or in scripting when path ends with slash

https://winscp.net/tracker/1661

Source commit: 1a327859858352284c82d1f1307e6b5caf71343d
Martin Prikryl 7 years ago
parent
commit
593fe11e34
1 changed files with 1 additions and 1 deletions
  1. 1 1
      source/core/S3FileSystem.cpp

+ 1 - 1
source/core/S3FileSystem.cpp

@@ -816,7 +816,7 @@ void TS3FileSystem::DoListBucket(
 void TS3FileSystem::ReadDirectoryInternal(
   const UnicodeString & APath, TRemoteFileList * FileList, int MaxKeys, const UnicodeString & FileName)
 {
-  UnicodeString Path = AbsolutePath(APath, false);
+  UnicodeString Path = UnixExcludeTrailingBackslash(AbsolutePath(APath, false));
   if (IsUnixRootPath(Path))
   {
     DebugAssert(FileList != NULL);