Revision b3589802 lib/backend.py
b/lib/backend.py | ||
---|---|---|
2808 | 2808 |
@raises RPCFail: if the file is not valid |
2809 | 2809 |
|
2810 | 2810 |
""" |
2811 |
queue_dir = os.path.normpath(pathutils.QUEUE_DIR) |
|
2812 |
result = (os.path.commonprefix([queue_dir, file_name]) == queue_dir) |
|
2813 |
|
|
2814 |
if not result: |
|
2811 |
if not utils.IsBelowDir(pathutils.QUEUE_DIR, file_name): |
|
2815 | 2812 |
_Fail("Passed job queue file '%s' does not belong to" |
2816 |
" the queue directory '%s'", file_name, queue_dir)
|
|
2813 |
" the queue directory '%s'", file_name, pathutils.QUEUE_DIR)
|
|
2817 | 2814 |
|
2818 | 2815 |
|
2819 | 2816 |
def JobQueueUpdate(file_name, content): |
Also available in: Unified diff