Manager: Don't need to do a full capture
This commit is contained in:
+2
-2
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user