Browse Source

Manager: Don't need to do a full capture

master
Riyyi 3 years ago
parent
commit
34e0dc72ec
  1. 4
      src/dotfile.cpp

4
src/dotfile.cpp

@ -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);

Loading…
Cancel
Save