delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:to:cc:references:in-reply-to:subject:date | |
:message-id:mime-version:content-type; q=dns; s=default; b=hKMBe | |
z+3vOtqMoXSYB9M/4dXvahCNcUzTFFl9nGzZKkprPCG6Nq02xnGmjTMQ6d9RoBfl | |
D2kGaNVokhhqsyiDq7qLob4B1jn68wUmwyhtGAwaIWlQXHRzS531DYrY0LEptaOG | |
6/IBDgbJXBqgB5u4/z8Pt9j2eR1v9GU5o5vtwo= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:to:cc:references:in-reply-to:subject:date | |
:message-id:mime-version:content-type; s=default; bh=ccqJvkPdoYp | |
DlpoNmF5tZsGm8kY=; b=cR6YaB5g3/M+bxgJvL0eogOmowXuJbfBMPsmtC15FJY | |
8GriZtfP7u7V/pZbz/k4sIAlvcgQf/e/YKZAs1O5VWWJ4bH17BqBSy+dAodJYW7D | |
ec8fMMuGMc+4dnH4w+hysZHLOS2TC+EqGBT/9wEUBZJ6nbT6DEGt1bk60wKaF3TI | |
= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 |
X-HELO: | mailout3.w1.samsung.com |
From: | Pavel Fedin <p DOT fedin AT samsung DOT com> |
To: | cygwin AT cygwin DOT com |
Cc: | daveroth AT acm DOT org |
References: | <004101cfe6a8$fac2d340$f04879c0$%fedin AT samsung DOT com> <543C29B9 DOT 8040409 AT acm DOT org> <002701cfe83b$dfe19090$9fa4b1b0$%fedin AT samsung DOT com> <543EA135 DOT 8010809 AT acm DOT org> |
In-reply-to: | <543EA135.8010809@acm.org> |
Subject: | RE: FW: [BUG] SCons 2.3.0 sometimes cannot find files |
Date: | Thu, 16 Oct 2014 16:50:42 +0400 |
Message-id: | <000d01cfe93f$cbb8efa0$632acee0$%fedin@samsung.com> |
MIME-version: | 1.0 |
X-IsSubscribed: | yes |
------=_NextPart_000_000E_01CFE961.52CA8FA0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello! > The original email you sent did not include any attachment. Can you > please reply to this email with the test case attached. Ops, sorry. I forgot to attach the file. Here it is. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia ------=_NextPart_000_000E_01CFE961.52CA8FA0 Content-Type: text/plain; name="test.py" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="test.py" import os import sys # Cygwin's os.path.normcase pretends it's on a case-sensitive filesystem. _is_cygwin =3D sys.platform =3D=3D "cygwin" if os.path.normcase("TeSt") =3D=3D os.path.normpath("TeSt") and not _is_cyg= win: def _my_normcase(x): return x else: def _my_normcase(x): return x.upper() class Entry: def entry_exists_on_disk(self, name): try: d =3D self.on_disk_entries except AttributeError: d =3D {} try: entries =3D os.listdir(self.abspath) except OSError: pass else: for entry in map(_my_normcase, entries): d[entry] =3D True self.on_disk_entries =3D d if sys.platform =3D=3D 'win32': name =3D _my_normcase(name) result =3D d.get(name) if result is None: # Belt-and-suspenders for Windows: check directly for # 8.3 file names that don't show up in os.listdir(). result =3D os.path.exists(self.abspath + OS_SEP + name) d[name] =3D result return result else: return name in d test_entry =3D Entry() test_entry.abspath =3D '.' result =3D test_entry.entry_exists_on_disk('test.py') if result: print 'PASS' else: print 'FAIL' ------=_NextPart_000_000E_01CFE961.52CA8FA0 Content-Type: text/plain; charset=us-ascii -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ------=_NextPart_000_000E_01CFE961.52CA8FA0--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |