Skip to content

Commit

Permalink
Unify after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Sploder12 committed Dec 17, 2024
1 parent bc08d4b commit 36e630f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/platform/platform_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bool mp::platform::Platform::set_permissions(const Path& path, const Perms permi
return QFile::setPermissions(path, permissions);
}

bool mp::platform::Platform::take_ownership(const mp::Path& path) const
bool mp::platform::Platform::take_ownership(const Path& path) const

Check warning on line 66 in src/platform/platform_unix.cpp

View check run for this annotation

Codecov / codecov/patch

src/platform/platform_unix.cpp#L66

Added line #L66 was not covered by tests
{
return this->chown(path.toStdString().c_str(), 0, 0) == 0;

Check warning on line 68 in src/platform/platform_unix.cpp

View check run for this annotation

Codecov / codecov/patch

src/platform/platform_unix.cpp#L68

Added line #L68 was not covered by tests
}
Expand Down
8 changes: 2 additions & 6 deletions tests/mock_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,9 @@ class MockPlatform : public platform::Platform
MOCK_METHOD(bool, is_remote_supported, (const std::string&), (const, override));
MOCK_METHOD(bool, is_backend_supported, (const QString&), (const, override));
MOCK_METHOD(bool, is_alias_supported, (const std::string&, const std::string&), (const, override));
MOCK_METHOD(bool, set_permissions, (const multipass::Path&, const QFileDevice::Permissions), (const, override));
MOCK_METHOD(int, chown, (const char*, unsigned int, unsigned int), (const, override));
MOCK_METHOD(bool,
set_permissions,
(const multipass::Path& path, const QFileDevice::Permissions),
(const, override));
MOCK_METHOD(bool, take_ownership, (const multipass::Path& path), (const, override));
MOCK_METHOD(bool, set_permissions, (const Path&, const Perms), (const, override));
MOCK_METHOD(bool, take_ownership, (const Path&), (const, override));
MOCK_METHOD(bool, link, (const char*, const char*), (const, override));
MOCK_METHOD(bool, symlink, (const char*, const char*, bool), (const, override));
MOCK_METHOD(int, utime, (const char*, int, int), (const, override));
Expand Down

0 comments on commit 36e630f

Please sign in to comment.