diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-09-02 22:14:59 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-09-02 22:14:59 +0300 |
commit | 2fe88bebd89b95272f753477831cf2c6b9172516 (patch) | |
tree | 302faa8ea63c761d363c46fe30c1d52ba089f8b7 /meson.py | |
parent | d742f1be51ac0916f9a3df4f93c67255aaa35131 (diff) | |
download | meson-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-x | meson.py | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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. |