Fixed implementation of path alias settings.

Now report an error if path is already aliased to another location.
This commit is contained in:
2015-07-07 17:20:25 +02:00
parent 37729f648a
commit 4c8af3ef66
5 changed files with 28 additions and 2 deletions

View File

@@ -305,6 +305,18 @@ feature -- Path aliases
storage.unset_path_alias (a_source, a_alias)
end
location_alias (a_source: READABLE_STRING_8): READABLE_STRING_8
-- Location alias associated with `a_source' or the source itself.
do
Result := a_source
if attached storage.path_alias (Result) as l_path then
Result := l_path
if Result.starts_with ("/") then
Result := Result.substring (2, Result.count)
end
end
end
path_alias (a_source: READABLE_STRING_8): READABLE_STRING_8
-- Path alias associated with `a_source' or the source itself.
do