aboutsummaryrefslogtreecommitdiff
path: root/serverutils.d
diff options
context:
space:
mode:
authorNathan Lasseter <nathan@4574.co.uk>2013-10-24 22:38:45 +0100
committerNathan Lasseter <nathan@4574.co.uk>2013-10-24 22:38:45 +0100
commit5d58503d4e36091d5fca0edbca6be5a71d883044 (patch)
treef2667d41d5b7753f3c357454a42f1feab25f163d /serverutils.d
parentf3ee7526e1f04ccee1f1a4d3a775e2ce75169926 (diff)
Some errors and rooted properlyHEADmaster
Diffstat (limited to 'serverutils.d')
-rw-r--r--serverutils.d17
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;
-}