Author Topic: ssymlinkdirs and Junctions  (Read 3193 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
ssymlinkdirs and Junctions
« on: September 08, 2016, 08:20:35 PM »
Can +ssymlinkdirs be made to also recognize junctions?


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: ssymlinkdirs and Junctions
« Reply #1 on: September 08, 2016, 10:47:54 PM »
We will see what can be done for junctions after v21 is out. I'm not sure if this is possible or not.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: ssymlinkdirs and Junctions
« Reply #2 on: September 08, 2016, 11:30:46 PM »
On unix-y systems do you make use of the iNode # to determine if you have duplicate copies of the file thru different paths?


On windows, can you make use of nFileIndexHigh+nFileIndexLow+dwVolumeSerialNumber?


These won't tell you if path of the path is a link of some sort, but at least you would know if two paths point to the same file.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: ssymlinkdirs and Junctions
« Reply #3 on: September 09, 2016, 02:47:39 AM »
I think we do use the iNode and the dev number to avoid infinite recursion. We also fully resolve Unix symbolic links like we do on Windows.

I haven't studied Junctions enough to know what we can and can't do. If they can be resolved efficiently, that would be best.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: ssymlinkdirs and Junctions
« Reply #4 on: September 23, 2016, 03:19:53 AM »
I attempted Junction support for RC 3. Give it a try. If you turn on symlink directory support, it turns on the Junction support as well. It works identically to the implementation for Windows symlinks.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: ssymlinkdirs and Junctions
« Reply #5 on: September 23, 2016, 06:46:07 PM »
Cool - works!


File History keeps duplicates.
e C:\Users\joe\JUNCTION_to_Folder\foo.txt
e C:\Users\joe\Folder\foo.txt


Slick recognizes foo.txt is the same file, but keeps the buffer name as the first used to load the file.
It then keep *both* entries in the file open history.


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: ssymlinkdirs and Junctions
« Reply #6 on: September 23, 2016, 11:10:58 PM »
This isn't fixable without robbing Peter to pay Paul (fixing it for you and breaking it for someone else).

You would think it would be fine to resolve the symlinks when doing the matching (trivial to do). Nope. Can't do that because there are customers that have build tools which only work on the unresolved absolute name. There's no way for us to know which one is the one they really want us to use. When SlickEdit parses in the buffer name, it's always uses the unresolved absolute filename. When we've broken this, we get notified pretty quickly.

When opening a file, it isn't safe to open a file twice. If you specified the wrong path, you have to close it if you want to correct the buffer name. There's no other option for that case.