diff options
author | 2021-02-19 17:27:47 -0800 | |
---|---|---|
committer | 2021-02-19 17:27:47 -0800 | |
commit | 56459e5774b4089e734239f51961f128957f62c5 (patch) | |
tree | d3f291d2cf2fc98fe8c3ab4d38e032d3381c66d1 | |
parent | 99a1dc0c58dce0e213df61d0f8fadc068aef9817 (diff) | |
download | ldid-56459e5774b4089e734239f51961f128957f62c5.tar.gz ldid-56459e5774b4089e734239f51961f128957f62c5.tar.zst ldid-56459e5774b4089e734239f51961f128957f62c5.zip |
Don't sign symlinks as part of old "files" schema.
-rw-r--r-- | ldid.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -2686,19 +2686,20 @@ Bundle Sign(const std::string &root, Folder &folder, const std::string &key, Sta break; } - for (const auto &link : links) - for (const auto &rule : version.second) - if (rule(link.first)) { - if (rule.mode_ != OmitMode) { - auto entry(plist_new_dict()); - plist_dict_set_item(entry, "symlink", plist_new_string(link.second.c_str())); - if (rule.mode_ == OptionalMode) - plist_dict_set_item(entry, "optional", plist_new_bool(true)); - plist_dict_set_item(files, link.first.c_str(), entry); - } + if (!old) + for (const auto &link : local.links) + for (const auto &rule : version.second) + if (rule(link.first)) { + if (rule.mode_ != OmitMode) { + auto entry(plist_new_dict()); + plist_dict_set_item(entry, "symlink", plist_new_string(link.second.c_str())); + if (rule.mode_ == OptionalMode) + plist_dict_set_item(entry, "optional", plist_new_bool(true)); + plist_dict_set_item(files, link.first.c_str(), entry); + } - break; - } + break; + } if (!old && mac) for (const auto &bundle : bundles) { |