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:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=lwk 8IK3o7IDzJtaiHYoCiTQ82WktmKTidGBcoLd5N/eXZ9oVEh0haUVxS3xtZ3582Bc u23lRVDpTSuRL4xkmi5lp1bCDXoYB/yqfmXCNzFPVZG1u6y3sOq9FZCM68F/+Ct8 X0G7wO4YoKRt/Eo9b1LI87xk5gPRR3tfGApXyvLE= 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:to:from:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=KX2ttxFoN LUgklIGwE9ybwvnZHk=; b=JOXv95Xn+zAo1PSVi2we6+Z9DPtS//z/Mjwrh5rIs LtUvswC0qm8fJYogjHpocfQqPPN2bT59dcPlylvm6qgpVfz9Lde5IGrpBOut1/eX GB3OR5nHk/67H8ZLxQFHmnn1pFwJyxml76iT5a0ZR2qJ2aMhJnLnZfLVkm8YZmLV o4= 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 X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=BAYES_20,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 To: cygwin AT cygwin DOT com From: Brendan Byrd Subject: Junctions + "pwd -P" = only skin deep resolution Date: Thu, 9 May 2013 00:49:15 +0000 (UTC) Lines: 35 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) Junctions seem to respond differently to symlinks with commands like "pwd - P", getcwd(), or Perl's Cwd::getcwd. This is the last stop of a wild goose chase for a bug that I thought was centered around File::chdir. More details here: https://rt.cpan.org/Ticket/Display.html?id=84988 However, upon further inspection, the buck stop here. Here's the problem: Let's say I have a junction of /var/bin pointing to /usr/local/bin. It looks just like a symlink in a "ls -l" on /var lrwxrwxrwx 1 bbyrd Domain Users 14 May 8 20:23 bin -> /usr/local/bin So, starting from /var, here's what I get from "pwd -P": bbyrd AT PC:/var$ pwd -P /var bbyrd AT PC:/var$ cd bin bbyrd AT PC:/var/bin$ pwd -P /usr/local/bin bbyrd AT PC:/var/bin$ mkdir asd bbyrd AT PC:/var/bin$ cd asd bbyrd AT PC:/var/bin/asd$ pwd -P /var/bin/asd What the hell? Everything was going fine until you dive deeper into the directory, past the junction point. This should have read "/usr/local/bin/asd", since the "-P" means to find ALL of the symlinks and resolve them. This actually works exactly like that with symlinks, but symlinks suck outside of Cygwin. (Windows just gives me a stupid "System folder" in Explorer.) I'd like to have the best of both worlds: Junctions that play nice in both Cygwin and Windows. -- 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