delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/07/16/11:01:34

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:date:from:to:subject:message-id:mime-version
:content-type; q=dns; s=default; b=Cglb3RE40UGl5PjRjGXx3G1cijvrP
wfq19R7bWU/p2dNLM5od1bh72olR+vNzI2GAUk53loJHS7Zs8AhFDIQppGaFyeXl
D9udT9ziuzAMmW+XzwV/P9Mw0t4hibvryEnRx1ligzRtzY7Zo/3fs2P4nnNeRbeS
s0CvqAIZqlQkNY=
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:date:from:to:subject:message-id:mime-version
:content-type; s=default; bh=XZw4QSR0gX738Q7CGo1ergRZWLI=; b=Ikq
ygYwJ6eTNgSeVa0XkB+x/TyM8xZdu3OH9StGko90XeByhUpgojxy7e3w+X15z44F
PtUZ15u0x0y2mtrDS+AXiJ/ufGNh59WYGUWBZVS7AYpMwodbN9ccuyF8FOaC0+1K
NPgkqKbYrGo69rnuQgAcA7YXCyPU9o8MVo5IDUbI=
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
X-Spam-SWARE-Status: No, score=1.6 required=5.0 tests=BAYES_50,RDNS_NONE,SPF_PASS autolearn=no version=3.3.1
Date: Tue, 16 Jul 2013 18:01:06 +0300
From: Mikko Rapeli <mikko DOT rapeli AT iki DOT fi>
To: cygwin AT cygwin DOT com
Subject: Cygwin, python and abspath()
Message-ID: <20130716150106.GI23038@lakka.kapsi.fi>
MIME-Version: 1.0
X-SA-Exim-Connect-IP: 2001:1bc8:1004::1
X-SA-Exim-Mail-From: mikko DOT rapeli AT iki DOT fi
X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false

Hi,

Does anyone know why os.path.abspath() in python on cygwin is creating
invalid path names when given these cygwin compatible dos path names?

$ pwd
/cygdrive/c/temp

$ python -c "import os; os.path.abspath('/cygdrive/c/temp')"
/cygdrive/c/temp

$ python -c "import os; os.path.abspath('c:/temp')"
/cygdrive/c/temp/c:/temp

I have cmake generating the dos compatible path names and they work with
all other cygwin utilities that I've used.

And wouldn't it be nice if cygwin would not allow creating files and
directories named "c:"...

-Mikko

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019