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:mime-version:from:date:message-id:subject:to :content-type; q=dns; s=default; b=YgvkSG4xg0z2MV7M/mP1sTSo2cS8c yd40u+TNGWQMYozeoWsyWyxj3dXxj9DUbpjo/+BNj1bBeep7Sks7RuUMpLBG6oyL OYnlQSj6rdjpNgWm4oYGTxOxhmPoy8b84G9dBWKaiOr9O7KfJ3KOokU7ABOxMbqh 1pHrn+JajdCDZI= 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:mime-version:from:date:message-id:subject:to :content-type; s=default; bh=t1pmjdncQA57qQHdtMAiIvoOfCg=; b=CzO dZZKtBIxBvCqScxmA/dTnybv8pM7Y7rFDxey92gh9TtrVBD75YfJW1eR6xpocE1E CosdLfF76JkSs/cYehsGmtnY1mCZNLJVKzByNmpjsrilyPb4jknoIY1iv3x4Hk/b B54pzUER0M1SoM66lnWTjpNJpgUTnqPUfz7Nu71w= 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=upwards X-HELO: mail-ot0-f181.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=BK4mrwqQ5vAxAmbjWeNVun4g+d9WMYgYdONGlbNYRA8=; b=IkWwNxOVSBoGtiYpssEilSTp+IQCH8SV5hE29lBto9epyCrKUxRkzJADkttvN+1S/0 yVJ8Cjcvcnwb6sXreb3xA8WffueEe83xK4JwoA7/7ODRz+CW7OAEULDu8RMVzUOA/xRP lH3PDS8bqaoaJbnbkXUOwfEu+T17dTpfn4wT1CwJooj1WrLCYOLHDD2pmbfd5h9o7xQJ t0CNM4BNIF3iTtwwOuDbJDvD6sPoLclWe3WYyXYCcUbjzAs9JUwxkgTd/2ruhuTm7kgi tn1lbFx1chGehbq67srcZT4aIcEfo6GmrdXFUpO+V9TPrrLqp4AUvZniTWk7vfCkvKrY /TtQ== X-Gm-Message-State: AKGB3mInZdaDDowJs5+X4by6HChu/jkts+inUEMwRc/xM0/Mu+CLTU93 Yht6iumMXQgrcn5A18hJpXhdvOWBzzxuVQw0fl3D X-Google-Smtp-Source: ACJfBoto5a0cBSQT9lmPGopyo0SPSF0eZthy6UBpntDLi/S6CVHt23R9C+HOu74QUsGHTg0WF3oqCAkw9c6axsRyW54= X-Received: by 10.157.65.182 with SMTP id p51mr1116488ote.12.1513012751454; Mon, 11 Dec 2017 09:19:11 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?Q?Jo=C3=A3o_Eiras?= Date: Mon, 11 Dec 2017 18:18:30 +0100 Message-ID: Subject: Issue with resolving symlinks (realpath, readlink, etc) To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" Hi. Programs and functions that rely in realpath() are broken. Example: $ cd $ ln -s /var symlink $ cd symlink $ readlink -m . /var $ mkdir subfolder $ cd subfolder $ readlink -m . /home/user/symlink/subfolder # should be /var/subfolder This is the block I think is causing problems, as it breaks the loop as soon as a real file is found, instead of iterating further upwards resolving ancestors. https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/path.cc#l994 There also a comment at line 736 that says: "Scan path_copy from right to left looking either for a symlink or an actual existing file. If an existing file is found, just return. If a symlink is found, exit the for loop." Thank you. -- 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