Skip to content

Commit 22f64c4

Browse files
committed
Accept clang linting
1 parent 9438230 commit 22f64c4

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

libmamba/include/mamba/core/util.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ namespace mamba
5454

5555
inline void make_executable(const fs::u8path& p)
5656
{
57-
const auto permissions = fs::perms::owner_all | fs::perms::group_all |
58-
fs::perms::others_read | fs::perms::others_exec;
59-
if (! fs::has_permissions(p, permissions))
60-
fs::permissions(p, permissions);
57+
const auto permissions = fs::perms::owner_all | fs::perms::group_all
58+
| fs::perms::others_read | fs::perms::others_exec;
59+
if (!fs::has_permissions(p, permissions))
60+
{
61+
fs::permissions(p, permissions);
62+
}
6163
}
6264

6365
// @return `true` if `TemporaryFile` will not delete files once destroy.

libmamba/include/mamba/fs/filesystem.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ namespace mamba::fs
11401140
}
11411141

11421142
// Check if we have modification rights on a path
1143-
bool has_permissions(const u8path&, fs::perms const&);
1143+
bool has_permissions(const u8path&, const fs::perms&);
11441144

11451145
// void permissions(const path& p, perms prms, perm_options opts = perm_options::replace);
11461146
// void permissions(const path& p, perms prms, error_code& ec) noexcept;

libmamba/src/core/subdir_index.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,10 +1004,10 @@ namespace mamba
10041004

10051005
const auto permissions = fs::perms::owner_all | fs::perms::group_all
10061006
| fs::perms::others_read | fs::perms::others_exec;
1007-
if (! fs::has_permissions(cache_dir, permissions)) {
1007+
if (!fs::has_permissions(cache_dir, permissions))
1008+
{
10081009
fs::permissions(cache_dir, permissions, fs::perm_options::replace);
1009-
LOG_TRACE << "Set permissions on cache directory " << cache_dir
1010-
<< " to 'rwxrwxr-x'";
1010+
LOG_TRACE << "Set permissions on cache directory " << cache_dir << " to 'rwxrwxr-x'";
10111011
}
10121012

10131013
std::error_code ec;

libmamba/src/fs/filesystem.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ namespace mamba::fs
8383
#endif
8484
}
8585

86-
87-
bool has_permissions(const u8path& path, fs::perms const& perm) {
88-
86+
bool has_permissions(const u8path& path, const fs::perms& perm)
87+
{
8988
// Get path permissions
9089
auto p = std::filesystem::status(path).permissions();
9190

0 commit comments

Comments
 (0)