X-Recipient: archive-cygwin AT delorie DOT 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 User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Cygwin ML CC: Fergus 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 AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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/