mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Don’t read user settings from file::path_attributes
The reason for this is mainly that the path given to path_attributes() might be a virtual path, in which case using that to obtain settings can cause problems. For example if the (virtual) path is ‘/net/some/long/path’ (rmate) then we’ll hit that path locally, but stat’ing paths under /net can take seconds.
Also, the ‘scopeAttributes’ read from the user settings isn’t technically path attributes. Though the feature this allows is that we can scope the encrypt/decrypt export/import commands to ‘attr.enable-encryption’ and then put something like this in a project’s .tm_properties:
[ private/** ]
scopeAttributes = "attr.enable-encryption"
This commit is contained in:
@@ -38,9 +38,6 @@ namespace file
|
||||
}
|
||||
|
||||
res.push_back(text::format("attr.os-version.%zu.%zu.%zu", oak::os_major(), oak::os_minor(), oak::os_patch()));
|
||||
|
||||
std::string const parentDir = dir == NULL_STR ? path::parent(path) : dir;
|
||||
res.push_back(settings_for_path(path, text::join(res, " "), parentDir).get(kSettingsScopeAttributesKey, ""));
|
||||
res.erase(std::remove(res.begin(), res.end(), ""), res.end());
|
||||
return text::join(res, " ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user