Browse Source

Manager: Detect system files correctly during add and pull operations

master
Riyyi 3 years ago
parent
commit
5d5c37a496
  1. 6
      src/dotfile.cpp

6
src/dotfile.cpp

@ -385,7 +385,11 @@ bool Dotfile::include(const std::filesystem::path& path, const std::vector<std::
bool Dotfile::isSystemTarget(const std::string& target)
{
for (const auto& systemDirectory : m_systemDirectories) {
if (target.find(systemDirectory) - m_workingDirectorySize == 0) {
if (target.find(systemDirectory) == 0) {
return true;
}
if (target.find(m_workingDirectory / systemDirectory) == 0) {
return true;
}
}

Loading…
Cancel
Save