Skip to content

Commit 0ae7a0d

Browse files
author
Jinjin.He
committed
fix CreateDirectoryIfNotExists trim fault about drive letter while using MinGW
1 parent eb3c01a commit 0ae7a0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ bool CreateDirectoryIfNotExists(const char* path, bool createParentDirs)
218218
for (size_t i = createParentDirs ? 0 : directoryName.size() - 1; i < directoryName.size(); i++)
219219
{
220220
// Create the intermediate directory if we find a delimiter and the delimiter is not the first char, or if this is the target directory.
221-
if (i != 0 && (directoryName[i] == FileSystem::PATH_DELIM || i == directoryName.size() - 1))
221+
if (i > 2 && (directoryName[i] == FileSystem::PATH_DELIM || i == directoryName.size() - 1))
222222
{
223223
// the last delimeter can be removed safely.
224224
if (directoryName[i] == FileSystem::PATH_DELIM)

0 commit comments

Comments
 (0)