mirror of
https://github.com/usatiuk/backup.git
synced 2025-10-26 09:27:48 +01:00
maybe fix symlinks?
This commit is contained in:
@@ -54,7 +54,9 @@ std::vector<char> File::getFileContents(const std::filesystem::path &p) {
|
||||
}
|
||||
if (type == Type::Symlink) {
|
||||
auto target = std::filesystem::read_symlink(p).u8string();
|
||||
return {target.begin(), target.end()};
|
||||
std::vector<char> target_null_term = {target.begin(), target.end()};
|
||||
target_null_term.emplace_back('\0');
|
||||
return target_null_term;
|
||||
}
|
||||
throw Exception("Error with file " + p.u8string());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user