Commit cc475723 authored by jochen@chromium.org's avatar jochen@chromium.org

Don't try to delete directories if sub directories are still part of the client

BUG=171212
TEST=ios debug simulator doesn't fail every other run
R=maruel@chromium.org

Review URL: https://chromiumcodereview.appspot.com/12537007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@187284 0039d316-1c4b-4281-b951-d872f2087c98
parent 468ed069
......@@ -1128,8 +1128,16 @@ solutions = [
# Fix path separator on Windows.
entry_fixed = entry.replace('/', os.path.sep)
e_dir = os.path.join(self.root_dir, entry_fixed)
def _IsParentOfAny(parent, path_list):
parent_plus_slash = parent + '/'
return any(
path[:len(parent_plus_slash)] == parent_plus_slash
for path in path_list)
# Use entry and not entry_fixed there.
if entry not in entries and os.path.exists(e_dir):
if ((not any(path.startswith(entry + '/') for path in entries)) and
os.path.exists(e_dir)):
file_list = []
scm = gclient_scm.CreateSCM(prev_url, self.root_dir, entry_fixed)
scm.status(self._options, [], file_list)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment