Merge pull request #1462 from abderrahim/tar-permissions

tar.py: fix permissions in tarballs
diff --git a/src/buildstream/plugins/sources/tar.py b/src/buildstream/plugins/sources/tar.py
index f9df802..9e53ea6 100644
--- a/src/buildstream/plugins/sources/tar.py
+++ b/src/buildstream/plugins/sources/tar.py
@@ -77,7 +77,7 @@
         # Respect umask instead of the file mode stored in the archive.
         # The only bit used from the embedded mode is the executable bit for files.
         umask = utils.get_umask()
-        if self.isdir() or bool(self.__permission | 0o100):
+        if self.isdir() or bool(self.__permission & 0o100):
             return 0o777 & ~umask
         else:
             return 0o666 & ~umask