Skip to content
Browse files

[feature] opages: /PATH/ was creating a new hierarchy

  • Loading branch information...
1 parent 84b3808 commit 29d6ac314afb0490836f2778d0fb8e038034023b @Aqua-Ye Aqua-Ye committed Jul 6, 2011
Showing with 8 additions and 1 deletion.
  1. +8 −1 OPAges/src/page.opa
View
9 OPAges/src/page.opa
@@ -245,9 +245,16 @@ Page = {{
)
make_absolute(file) =
- match String.index("/", file)
+ // Add the starting /
+ file = match String.index("/", file)
{some=0} -> file
_ -> "/{file}"
+ // Remove the ending /
+ len = String.length(file)
+ file = if String.get(len-1, file) == "/" then
+ String.substring(0, len-1, file)
+ else file
+ file
/**
* {2 Database access}

0 comments on commit 29d6ac3

Please sign in to comment.
Something went wrong with that request. Please try again.