Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: In the side-panel file navigator, symbolic linked folders have wrong links #1548

Closed
1 of 3 tasks
sunapi386 opened this issue Dec 21, 2016 · 7 comments
Closed
1 of 3 tasks

Comments

@sunapi386
Copy link

Summary

Expected behavior

  • image folder icon with no link to be non-symbolically linked, real folder
  • image folder icon with link to be symbolically linked folder

Actual behavior

Folders in Sublime side-panel do not reflect the actual links.

Steps to reproduce

  1. Make symlinked folders like so
lrwxr-xr-x   1 jason  staff     3 Nov  7 13:56 D10 -> D1x
lrwxr-xr-x   1 jason  staff     3 Nov  7 13:56 D11 -> D1x
drwxr-xr-x   4 jason  staff   136 Nov  7 13:56 D1x
lrwxr-xr-x   1 jason  staff     3 Nov 28 15:14 D20 -> D2x
lrwxr-xr-x   1 jason  staff     3 Nov 28 15:14 D21 -> D2x
drwxr-xr-x   4 jason  staff   136 Dec 20 16:14 D2x
  1. Open Sublime and look at the side panel

image

Environment

Verified on:

  • Operating system and version:
    • Windows ...
    • Mac OS ...
    • Linux ...
  • Sublime Text:
    • Build 3126
      image
@keith-hall
Copy link
Collaborator

Looks like this may have also been reported here: #151 (comment)

@FichteFoll
Copy link
Collaborator

It does seem like a duplicate, but the other issue is structurally problematic and chaotic. Prolly makes sense to tag this issue as well with the references in place.

@wbond
Copy link
Member

wbond commented Mar 8, 2017

Currently we just recognize duplicate inodes to prevent recursion and an infinite catalog of files in Goto Anything. As you can see, we are marking the first folder we find as the "main" entry. The reason for this is that the original folder might not actually be part of the open folders. If we skip all symlinks, then the folder would never be included. We only know that we need to skip something once we see it for the second time.

There may be some room to improve this, however I'm not sure exactly when I'm going to touch this part of the codebase next.

@dubeg
Copy link

dubeg commented Jun 16, 2017

I've encountered something similar, but slightly different. My case is that sublime has seen the directory before indeed, but it has moved since.

Example:
The directory dir1S is a symbolic link to the real directory dir1. The directory sub1 is a real directory that I'm simply moving in and out of dir1.

In the console, there's this line:
scan: /C/Users/gdube/test/sub1 has been seen before, skipping (using inode) previous path: /C/Users/gdube/test/dir1/sub1.

sym-ok
sym-bad

@wbond
Copy link
Member

wbond commented Jun 16, 2017

@debug It would seem that we would need to check folders when removing them to see if there is a duplicated folder and trigger rescanning that if the other duplicate is removed.

@dubeg
Copy link

dubeg commented Jun 20, 2017

I've got another case. Should I create different issues for these?

When creating a new folder within a symlinked folder, Sublime will append the new folder to the folder that it displays as a duplicate, but only under the specific conditions displayed in the screenshot below.

symbad2

@wbond
Copy link
Member

wbond commented Mar 29, 2018

This was fixed in build 3158.

@wbond wbond closed this as completed Mar 29, 2018
@wbond wbond added the R: fixed label Mar 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants