浏览代码

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
(cherry picked from commit 593fe11e34e18b37d9f818be213db693f39b0af0)

Source commit: c2374a67d43ab6c3df9c2cfbd6b6a6729d29f4eb
Martin Prikryl 7 年之前
父节点
当前提交
d554b585b3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      source/core/S3FileSystem.cpp

+ 1 - 1
source/core/S3FileSystem.cpp

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