Manager: Don't need to do a full capture

This commit is contained in:
Riyyi
2021-09-23 20:01:46 +02:00
parent e6842f58d8
commit 34e0dc72ec
+2 -2
View File
@@ -119,13 +119,13 @@ void Dotfile::pull(const std::vector<std::string>& targets)
size_t workingDirectory = s_workingDirectory.string().size(); size_t workingDirectory = s_workingDirectory.string().size();
sync( sync(
dotfiles, homeFiles, systemFiles, dotfiles, homeFiles, systemFiles,
[&](std::string* paths, const std::string& homeFile, const std::string& homeDirectory) { [&workingDirectory](std::string* paths, const std::string& homeFile, const std::string& homeDirectory) {
// homeFile = /home/<user>/dotfiles/<file> // homeFile = /home/<user>/dotfiles/<file>
// copy: /home/<user>/<file> -> /home/<user>/dotfiles/<file> // copy: /home/<user>/<file> -> /home/<user>/dotfiles/<file>
paths[0] = homeDirectory + homeFile.substr(workingDirectory); paths[0] = homeDirectory + homeFile.substr(workingDirectory);
paths[1] = homeFile; paths[1] = homeFile;
}, },
[&](std::string* paths, const std::string& systemFile) { [&workingDirectory](std::string* paths, const std::string& systemFile) {
// systemFile = /home/<user>/dotfiles/<file> // systemFile = /home/<user>/dotfiles/<file>
// copy: <file> -> /home/<user>/dotfiles/<file> // copy: <file> -> /home/<user>/dotfiles/<file>
paths[0] = systemFile.substr(workingDirectory); paths[0] = systemFile.substr(workingDirectory);