Cygwin, python and abspath()

Mikko Rapeli mikko.rapeli@iki.fi
Tue Jul 16 15:39:00 GMT 2013


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



More information about the Cygwin mailing list