diff options
author | Alexandre Foley <Alexandre.foley@usherbrooke.ca> | 2016-12-06 12:32:39 -0500 |
---|---|---|
committer | Alexandre Foley <Alexandre.foley@usherbrooke.ca> | 2016-12-06 12:32:39 -0500 |
commit | 27cd8c1e28f310891fa671976a0f3b4231ceb4b0 (patch) | |
tree | 3b8cb5036d1fd771089c6a18fbf21ced877fe42c | |
parent | 61d5934e63af65536cd22ef16127b4920c21c4f3 (diff) | |
download | meson-27cd8c1e28f310891fa671976a0f3b4231ceb4b0.zip meson-27cd8c1e28f310891fa671976a0f3b4231ceb4b0.tar.gz meson-27cd8c1e28f310891fa671976a0f3b4231ceb4b0.tar.bz2 |
The âdirectory present and not emptyâ return condition was necessary for subproject to work without a wrap file. Put it back with that added condition that there mustnât be a wrap file present for returning the package immediately.
-rw-r--r-- | mesonbuild/wrap/wrap.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index 57c7353..12536fe 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -94,7 +94,12 @@ class Resolver: fname = os.path.join(self.subdir_root, packagename + '.wrap') dirname = os.path.join(self.subdir_root, packagename) try: - if not os.listdir(dirname): + if os.listdir(dirname): + if not os.path.isfile(fname) : + # The directory is there, not empty and there isn't a wrap file? + # Great, use it. + return packagename + else: mlog.warning('Subproject directory %s is empty, removing to' ' ensure clean download' % dirname) os.rmdir(dirname) |