MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / MakeAbsolute

Method MakeAbsolute

libaegisub/common/path.cpp:104–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104fs::path Path::MakeAbsolute(fs::path path, std::string_view token) const {
105 if (path.empty()) return path;
106 int idx = checked_find_token(token);
107
108 path.make_preferred();
109 const auto str = path.string();
110 if (str.starts_with("?dummy") || str.starts_with("dummy-audio:"))
111 return path;
112 return (paths[idx].empty() || path.is_absolute()) ? path : paths[idx]/path;
113}
114
115std::string Path::Encode(fs::path const& path) const {
116 // Find the shortest encoding of path made relative to each token

Callers 5

project_propertiesFunction · 0.80
GetAudioProviderFunction · 0.80
LoadUnloadFilesMethod · 0.80
save_snapshotFunction · 0.80
TESTFunction · 0.80

Calls 2

checked_find_tokenFunction · 0.85
stringMethod · 0.80

Tested by 1

TESTFunction · 0.64