From b0ab5297d161d61975e67b04ba58a71f97c5cba8 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 23 Apr 2015 17:35:22 +1200 Subject: Change the semantics of the craft anchor point specification The anchor point is now defined as /p (rather than /p/), with the specification for a request just to /p or /p/ being empty. --- libpathod/utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libpathod/utils.py') diff --git a/libpathod/utils.py b/libpathod/utils.py index 39e61eac..431ba747 100644 --- a/libpathod/utils.py +++ b/libpathod/utils.py @@ -136,3 +136,8 @@ def daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'): # prag os.dup2(si.fileno(), sys.stdin.fileno()) os.dup2(so.fileno(), sys.stdout.fileno()) os.dup2(se.fileno(), sys.stderr.fileno()) + + +def matchpath(path, spec): + if path == spec or path.startswith(spec + "/"): + return True -- cgit v1.2.3