Fix issue when check that LibBuilder contains source file by path

This commit is contained in:
Ivan Kravets
2016-08-08 18:57:18 +03:00
parent 1efea0bd27
commit f9ead74b88

View File

@ -18,7 +18,7 @@ from __future__ import absolute_import
import os
import sys
from os.path import basename, commonprefix, isdir, isfile, join, realpath
from os.path import basename, commonprefix, isdir, isfile, join, realpath, sep
import SCons.Scanner
@ -93,7 +93,7 @@ class LibBuilderBase(object): # pylint: disable=too-many-instance-attributes
return "%s(%r)" % (self.__class__, self.path)
def __contains__(self, path):
return commonprefix((self.path, path)) == self.path
return commonprefix((self.path + sep, path)) == self.path + sep
@property
def name(self):