Skip to content

Commit

Permalink
Revert 32f876d
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Mar 27, 2024
1 parent bd4d3ba commit 805785d
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ type Enso_Path
if raw_segments.is_empty then Error.throw (Illegal_Argument.Error "Invalid path - it should contain at least one segment.") else
organization_name = raw_segments.first
segments = raw_segments.drop 1 . filter s-> s.is_empty.not
current_user_name = Enso_User.current.name
# The `if_not_error` is a workaround for https://github.com/enso-org/enso/issues/9283 and it can be removed after that is fixed.
current_user_name.if_not_error <|
if organization_name != current_user_name then Unimplemented.throw "Currently only resolving paths for the current user is supported." else
if segments.is_empty then Enso_Path.Value organization_name [] Nothing else
asset_name = segments.last
Enso_Path.Value organization_name (segments.drop (Index_Sub_Range.Last 1)) asset_name
if organization_name != Enso_User.current.name then Unimplemented.throw "Currently only resolving paths for the current user is supported." else
if segments.is_empty then Enso_Path.Value organization_name [] Nothing else
asset_name = segments.last
Enso_Path.Value organization_name (segments.drop (Index_Sub_Range.Last 1)) asset_name

## PRIVATE
resolve_parent self =
Expand Down

0 comments on commit 805785d

Please sign in to comment.