aboutsummaryrefslogtreecommitdiff
path: root/meson.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-09-02 22:14:59 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-09-02 22:14:59 +0300
commit2fe88bebd89b95272f753477831cf2c6b9172516 (patch)
tree302faa8ea63c761d363c46fe30c1d52ba089f8b7 /meson.py
parentd742f1be51ac0916f9a3df4f93c67255aaa35131 (diff)
downloadmeson-2fe88bebd89b95272f753477831cf2c6b9172516.zip
meson-2fe88bebd89b95272f753477831cf2c6b9172516.tar.gz
meson-2fe88bebd89b95272f753477831cf2c6b9172516.tar.bz2
Check for existance of core data file, not directory.
Diffstat (limited to 'meson.py')
-rwxr-xr-xmeson.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/meson.py b/meson.py
index b9d23dd..460dc1d 100755
--- a/meson.py
+++ b/meson.py
@@ -70,12 +70,7 @@ class MesonApp():
def has_build_file(self, dirname):
fname = os.path.join(dirname, environment.build_filename)
- try:
- ifile = open(fname, 'r')
- ifile.close()
- return True
- except IOError:
- return False
+ return os.path.exists(fname)
def validate_core_dirs(self, dir1, dir2):
ndir1 = os.path.abspath(dir1)
@@ -97,7 +92,7 @@ class MesonApp():
def validate_dirs(self, dir1, dir2, handshake):
(src_dir, build_dir) = self.validate_core_dirs(dir1, dir2)
- priv_dir = os.path.join(build_dir, 'meson-private')
+ priv_dir = os.path.join(build_dir, 'meson-private/coredata.dat')
if os.path.exists(priv_dir):
if not handshake:
msg = '''Trying to run Meson on a build directory that has already been configured.