Skip to content

Commit

Permalink
Merge branch 'main' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed Jan 9, 2025
2 parents d3e6a2c + 07f4e95 commit 94e66ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion base/fs_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// LAF Base Library
// Copyright (c) 2024 Igara Studio S.A.
// Copyright (c) 2024-2025 Igara Studio S.A.
// Copyright (c) 2001-2018 David Capello
//
// This file is released under the terms of the MIT license.
Expand Down Expand Up @@ -236,6 +236,8 @@ TEST(FS, GetAbsolutePath)
{
const auto cp = get_current_path();

EXPECT_EQ("", get_absolute_path("")); // Check that empty full path is empty on all platforms

EXPECT_EQ(join_path(cp, "a"), get_absolute_path("a"));
EXPECT_EQ(join_path(cp, "a"), get_absolute_path("./a"));
EXPECT_EQ(cp, get_absolute_path("."));
Expand Down
4 changes: 2 additions & 2 deletions base/fs_win32.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// LAF Base Library
// Copyright (c) 2020-2024 Igara Studio S.A.
// Copyright (c) 2020-2025 Igara Studio S.A.
// Copyright (c) 2001-2018 David Capello
//
// This file is released under the terms of the MIT license.
Expand Down Expand Up @@ -166,7 +166,7 @@ std::string get_absolute_path(const std::string& path)
else
full = path;

TCHAR buffer[MAX_PATH + 1];
TCHAR buffer[MAX_PATH + 1] = {};
GetFullPathName(from_utf8(full).c_str(), sizeof(buffer) / sizeof(TCHAR), buffer, nullptr);
return to_utf8(buffer);
}
Expand Down

0 comments on commit 94e66ef

Please sign in to comment.