diff options
Diffstat (limited to 'libpathod/utils.py')
-rw-r--r-- | libpathod/utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |