From: Ciaran Gultnieks Date: Sun, 27 Oct 2013 17:16:04 +0000 (+0000) Subject: Fix rm safety check X-Git-Tag: 0.1~292 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=dad4f496f069b0389ab10df844f0a8806677916c;p=fdroidserver.git Fix rm safety check I got it backwards due to my stupid parameter naming. --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index ce9eb594..6a6ed953 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1428,8 +1428,9 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path, if 'rm' in build: for part in build['rm'].split(';'): dest = os.path.join(build_dir, part.strip()) - if not os.path.realpath(dest).startswith(os.path.realpath(root_dir)): - raise BuildException("rm is outside build root") + if not os.path.realpath(dest).startswith(os.path.realpath(build_dir)): + raise BuildException("rm for {0} is outside build root {1}".format( + os.path.realpath(build_dir),os.path.realpath(dest))) if os.path.exists(dest): subprocess.call('rm -rf ' + dest, shell=True)