jtulach commented on PR #8998:
URL: https://github.com/apache/netbeans/pull/8998#issuecomment-3537961289

   - I was using the latest `master` build of NetBeans on my Mac for a week and 
yes, this relative paths issue is a problem
   
   > `realpath` ... was added to the POSIX standard in 2024
   > @neilcsmith-net wrote: there also is `absolutize_paths`
   
   - yes, introducing new dependency on `realpath` didn't feel quite right
   - reusing existing code that does the trick makes me feel 99.9% safe
   
   > @matthiasblaesing wrote: `basedir` computation ...  looks sane to me and 
is small enough to be copyable
   
   - with the discovery of existence of `absolute_paths` we could reuse the 
code when computing `basedir`:
   ```diff
   netbeans$ git diff
   diff --git nb/ide.launcher/unix/netbeans nb/ide.launcher/unix/netbeans
   index 3f65db67a3..a62ff77da3 100644
   --- nb/ide.launcher/unix/netbeans
   +++ nb/ide.launcher/unix/netbeans
   @@ -33,10 +33,6 @@ while [ -h "$PRG" ]; do
    done
    
    progdir=`dirname "$PRG"`
   -old=`pwd`
   -cd "$progdir"/..
   -basedir=`pwd`
   -cd "$old"
    
    case "`uname -s -m`" in
        Darwin*)
   @@ -68,6 +64,7 @@ absolutize_paths() {
    }
    
    # $HOME can be used as it is present on mac OS and
   +basedir=`echo "$progdir"/.. | absolutize_paths`
    BASEDIR=$basedir
    
    if [ -f "$basedir"/etc/netbeans.conf ] ; then
   ```
   - such a change isn't part of this PR yet (I try to avoid changing something 
that works)
   - but I can include it, if it passes your review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to