This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: if [ -w branching: how to spot a locked USB stick


A couple of months ago

http://www.cygwin.com/ml/cygwin/2007-07/msg00313.html

I wondered whether a user could use "if [ -w " branching in Cygwin to distinguish a locked stick from an unlocked stick. Apparently the answer was No but Corinna identified an easy fix

http://www.cygwin.com/ml/cygwin/2007-07/msg00335.html

I have recently changed to Vista from XP SP2 and amongst other annoyances I now find that "if [ -w " branching breaks when the test medium is a CD. (It's now reported as "write-able".)

Can anybody confirm this?

The fact that in Vista the directory c:/Windows is not accessible while c:/tmp is accessible seems to be correctly reported. The root c:/ is inaccessible in a strange new way, to me ("A required privilege is not held by the client" instead of "Access is denied") but in fact the output from "if -w /c" suggests, wrongly, that it is write-able.

Can anybody confirm this?

I suppose we could all post our individual experiences about how disconcertingly horrible Vista is, and how much it has broken or (seems to have) got wrong or how much existing established good stuff it has merely rendered in need of fixing. I suppose it would soon get wearisome for everybody else but I feel, and am, absolutely de-railed by it. Currently I am making much use of the command
export MY_DIR=`cygpath $LOCALAPPDATA`


Fergus


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]