X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <46F27420.1030603@bonhard.uklinux.net>
Date: Thu, 20 Sep 2007 14:22:40 +0100
From: Fergus <fergus@bonhard.uklinux.net>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
To: Cygwin ML <cygwin@cygwin.com>
CC: Fergus <fergus@bonhard.uklinux.net>
Subject: Re: if [ -w branching: how to spot a locked USB stick
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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/

