Author Topic: _FileReadLink() not working?  (Read 2936 times)

rowbearto

  • Senior Community Member
  • Posts: 2336
  • Hero Points: 132
_FileReadLink() not working?
« on: February 04, 2018, 10:21:36 PM »
I tried using _FileReadLink() to resolve a symbolic link for a file and a directory that was symlinked, and it did not return the original path to the file.

Is there an issue with _FileReadLink()?

I am using 22.0.1 hotfix 2 on Linux x64, CentOS 7.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2903
  • Hero Points: 153
Re: _FileReadLink() not working?
« Reply #1 on: February 05, 2018, 02:23:58 PM »
I'm not sure why that doesn't work.  As a workaround, try using:
Code: [Select]
   absolute(<filename>,null,true);

rowbearto

  • Senior Community Member
  • Posts: 2336
  • Hero Points: 132
Re: _FileReadLink() not working?
« Reply #2 on: February 05, 2018, 02:32:57 PM »
So you are able to reproduce _FileReadLink() not working?

I found a way entirely around using _FileReadLink() for what I was doing (to use 'p_buf_name_no_symlinks'), so I don't need it anymore, but still wanted to report this issue in case it was really broken and should be fixed.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2903
  • Hero Points: 153
Re: _FileReadLink() not working?
« Reply #3 on: February 05, 2018, 02:36:59 PM »
I haven't tested it - I was just going through all the forum messages this morning trying to give answers as quickly as I could where I could help.  I will test it and if I can reproduce it I will file a bug.

p_buf_name_no_symlinks is probably the right thing to use there if it's a buffer name.  I just fixed a bug where that property can get out of sync in a special auto-reload case.  I forget which particular user found that one ;).

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2903
  • Hero Points: 153
Re: _FileReadLink() not working?
« Reply #4 on: February 05, 2018, 03:26:27 PM »
There is a bug with _FileReadLink.  It's fixed for 22.0.2.
« Last Edit: February 09, 2018, 04:03:22 PM by Dan »

ZuZux

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Re: _FileReadLink() not working?
« Reply #5 on: February 12, 2018, 07:42:29 PM »
I get the same weird selection issue on Linux Mint, same as OP. I tried to load up live I don't think it's OS related though, could be wrong. Just wanted to throw that info in here.