diff options
author | Nathan Lasseter <nathan@4574.co.uk> | 2013-10-24 22:38:45 +0100 |
---|---|---|
committer | Nathan Lasseter <nathan@4574.co.uk> | 2013-10-24 22:38:45 +0100 |
commit | 5d58503d4e36091d5fca0edbca6be5a71d883044 (patch) | |
tree | f2667d41d5b7753f3c357454a42f1feab25f163d /serverutils.d | |
parent | f3ee7526e1f04ccee1f1a4d3a775e2ce75169926 (diff) |
Diffstat (limited to 'serverutils.d')
-rw-r--r-- | serverutils.d | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/serverutils.d b/serverutils.d deleted file mode 100644 index 43063ef..0000000 --- a/serverutils.d +++ /dev/null @@ -1,17 +0,0 @@ -bool inRoot(string path) { - auto level = 0; - if (path[0] == '/') return false; - while (path.length > 0) { - if (path[0] == '/') { - level++; - path = path[1..$]; - } else if (path[0] == '.' && path[1] == '.' && path[2] == '/') { - level--; - path = path[3..$]; - } else { - path = path[1..$]; - } - if (level < 0) return false; - } - return true; -} |