Sublime Forum

Strange folder bug

#1

Greetings!

I am currently plagued by a rather strange bug. In my project I have a folder structure which looks something like this:

<something>-connect/ frontend/ app/ public/ ads/ js/ css/ ...
Now, the problem is that Sublime Text 2 (Build 2181) refuses to show me the subfolders of the public/ folder. I can see the public/ folder, but when I try to open it nothing happens.

I tried several things in order to nail down the bug:

  • mv public piblic, restart ST2, everything works fine

  • cp -r public foo, restart ST2, everything works fine

  • mv foo public, restart ST2, public seems to be empty

  • drag the frontend subfolder to the ST2 folders sidebar directly, restart ST2, the frontend folder works, the -connect folder not

Really strange :smile:

Cheers,
Lars

0 Likes

Folder bug, please fix
Still problem with symbolic link-folders
#2

Are you using a Samba share by chance? A similar problem has been happening to me, so I’ve just been using the latest stable build (2181). Jon has some duplicate file/cycle checking going on in the latest dev/nightly builds, and the skipped files seem to occur because Samba doesn’t report the correct inode numbers. You can see which directories/files are skipped in the console.

0 Likes

#3

Actually, I was using a Samba share before, yes. Back then I thought that Samba might be the problem and therefore I did a new git checkout on my local disk. But it didn’t resolve the issue, unfortunately. The really strange thing is that this only happens for the public folder. Every other folder just works fine afaik. And as I said before, when I add the first subfolder frontend/ directly everything works fine, too. Even the public folder. So it seems it’s a strange combination of the name “public” and the level of depth.

0 Likes

#4

Ok, I checked the the console and indeed there seems to be something odd going on:

startup cache, total files: 96 cache hits: 96
startup time: 1.47568 (package setup was not run)
...
scan: /Users/lars/development/<xxx>/<xxx>-connect/frontend/app/public has been seen before, skipping
...

There are many more folders listed, too. Maybe ST2 still uses an older cache from those times when the sources where on a Samba share,
even though the sources are now located on my local disk?

0 Likes

#5

You might try deleting your .sublime-session file, or just starting from a freshly installed state. Projects on the local machine shouldn’t have the problem I described.

0 Likes

#6

Deleted both files in my ~/Library/Application Support/Sublime Text 2/Settings folder. Didn’t help, though. Maybe I will do a checkout on a different Mac and see if the problem still exists.

0 Likes

#7

The problem, unfortunately, still exits. Even worse, there are more folders now which appear to be empty in ST2 when in fact they aren’t. If only I knew what causes the problem. Is there any chance to help finding the root of the cause?

0 Likes

#8

The console output in build 2210 (2.0) is more verbose, and will tell you more about what’s going on in this situation

0 Likes

#9

After investigating the console output (thanks for this tip!) I think I found the root of the cause, finally:

scan: /Users/lars/development/pro7/prosieben-connect/frontend/app/public has been seen before, skipping (using inode) previous path: /Users/lars/development/pro7/prosieben-connect/backend/event_bus/public inode: 12078432

What I see is that ST2 skips symbolic links to folders and simply doesn’t show their contents. The original folder, however, normally works.
But the strange thing here is that frontend/app/public is actually the original folder and backend/event_bus/public is the symbolic link.

It seems that ST2 scans all folders in alphabetic order, sees backend/event_bus/public, then later frontend/app/public but discards the latter
one because the inode is already known (because of backend/event_bus/public). Unfortunately I would expect the files to be shown
in frontend/app/public, the original folder :smile:

How to reproduce:

  1. Create a folded called test
  2. Inside create a folder called “folder2” and create some files in it
  3. Inside create a folder called “folder1” and link it to folder2, like “ln -s folder1 folder2”
  4. Open test in ST2
  5. You can open folder 1 (the symbolic link) but not folder 2 (the original folder)

Update: I’ve added a test case. You can open folder 1 but not folder 4.
st2_folder_bug_testcase.tar.gz (384 Bytes)

1 Like

#10

I am observing the same behavior. I am accessing a Samba share (from a Unix filer) which has symbolic links, as well.

I’m using Sublime Text 2 on a Windows 7 32-bit device accessing a Samba share on a network filer. I have tried using the “folder_exclude_patterns” option to leave out the symbolic links and leave in only the original. This still did not affect or change the behavior of the issue as the original directories still exhibited the behavior.

Anybody know if there is a bug filed about this issue. It’s a pretty big pain to keep having to go Alt-P E every time I need to drill down in a directory and find a file.

Note, I don’t see this symptom when running Sublime Text 2 on Linux accessing the same Samba shares.

0 Likes

#11

Ok, so what’s the state on this thing? Is it a bug or is it a feature? :smile:

Update:
It seems I am not the only one:
viewtopic.php?f=3&t=2900&p=13763&hilit=folder+links#p13626
viewtopic.php?f=3&t=2917&start=0&hilit=folder+links

0 Likes

#12

I am seeing the same behavior and my observation matches user woeye’s posted earlier in the thread (viewtopic.php?f=3&t=7142#p33432).

It appears that Sublime Text proceeds in alphabetical order, finds the inode of the symlinked directory, then later skips the directory when it finds the same inode (even though that’s the “real” directory path, not the symlinked path).

In the example console output below, the “real” paths are:

/Users/me/dev/someapp/shared/spec /Users/me/dev/someapp/shared/attachments

which are symlinked to from:

/Users/me/dev/someapp/my-first-app/spec /Users/me/dev/someapp/my-first-app/attachments
and

 /Users/me/dev/someapp/my-second-app/spec
 /Users/me/dev/someapp/my-second-app/attachments
startup time: 0.93826 (package setup was not run)
scan: /Users/me/dev/someapp/shared/attachments has been seen before, skipping (using inode) previous path: /Users/me/dev/someapp/my-first-app/attachments inode: 3867976
scan: /Users/me/dev/someapp/shared/spec has been seen before, skipping (using inode) previous path: /Users/me/dev/someapp/my-first-app/spec inode: 543476
scan: /Users/me/dev/someapp/my-second-app/attachments has been seen before, skipping (using inode) previous path: /Users/me/dev/someapp/my-first-app/attachments inode: 3867976
scan: /Users/me/dev/someapp/my-second-app/spec has been seen before, skipping (using inode) previous path: /Users/me/dev/someapp/my-first-app/spec inode: 543476
scan: /Users/me/dev/someapp/shared/attachments has been seen before, skipping (using inode) previous path: /Users/me/dev/someapp/my-first-app/attachments inode: 3867976
scan: /Users/me/dev/someapp/shared/spec has been seen before, skipping (using inode) previous path: /Users/me/dev/someapp/my-first-app/spec inode: 543476
scan: /Users/me/dev/someapp/my-second-app/attachments has been seen before, skipping (using inode) previous path: /Users/me/dev/someapp/my-first-app/attachments inode: 3867976
scan: /Users/me/dev/someapp/my-second-app/spec has been seen before, skipping (using inode) previous path: /Users/me/dev/someapp/my-first-app/spec inode: 543476

I am not using Samba or any other network shares. This is occurring on my local drive on OS X 10.7.4. Seems like a bug to me.

0 Likes

#13

I’m not sure if this approach has already been taken, but I posted a comment on the general forum site and marked it as a bug. If you are affected, please go and vote up the item. I referenced this technical support entry.

Here’s the link to the general forum item (I’m not sure if it will work as it is not yet showing up on the main page:)
sublimetext.userecho.com/topic/1 … n-windows/

The title of the bug item is “Project folders do not update when accessing Samba share in Windows”.

0 Likes

#14

Just posting to say I have this problem too. On OS X. It’s not symlinks or Samba (edit - it might be Symlinks since Symfony requires them to parse CSS, but the files should still be there). It just seems to ignore the contents of directories, mainly ones that are deep within the framework structure. The way I get around it is to find the files externally and load them into a new Sublime window.

0 Likes

#15

The error I mentioned earlier in this thread is probably the cause of the issue: Samba doesn’t correctly report inode numbers. More to the point, it introduces collisions fairly often.

I suggest enabling this setting in your Preferences > Settings – User file:

"ignore_inodes": true
1 Like

#16

[quote=“nick.”]The error I mentioned earlier in this thread is probably the cause of the issue: Samba doesn’t correctly report inode numbers. More to the point, it introduces collisions fairly often.

I suggest enabling this setting in your Preferences > Settings – User file:

"ignore_inodes": true

That seemed to have fixed the problem. Thank you tremendously!!

0 Likes

#17

reporting the same issues, seems like this has been going on for years without much of a response.

Pre:

i) I use Ubuntu 12.04 for development work
ii) I use a samba share to connect to my dev server (not my choice :wink: )
iii) I love everything else about SB2 except the following issue (and im a long time textmate and komodo user as well)

A) Without any changes to settings or to samba config:

  1. Anytime I close sublime, and reopen, i am unable to refresh the folders, and folders list everything as empty. all files are empty.
  2. refreshing folders does nothing at all. must reopen entire project then reopen all files to see contents / make changes / save

B) After adding "ignore_inodes": true, to my user config:

  1. I can close and reopen sublime and maintain my project folders and all open files across the samba share, sometimes - if it is the same session in my OS
  2. sometimes i reopen sublime and the folders are missing, but refreshing them brings them back - if it is the same user session in my OS
  3. if I log out or reboot, the same problem as A) above persists (need to completely reopen folders and all files to see anything).

Note: Adding “change notify = yes” to my smb.conf seems to have no effect on this

C) I realized that “touching” the samba share BEFORE opening SB2 seems to alleviate this issue.

  1. After login to my system, I open nautilus and simply view the samba share once
  2. open SB2 and either the folders and files are open and work as expected, or I have to refresh the folders once and everything works

its not ideal, but its tolerable. id absolutely love to pay for a license for this software, but I wont until this issue is fixed.

0 Likes

#18

I think the issue is you still have some files of the Samba share in your system. It might not be removed completely which causing this issue in the system. The error message seems to be a conflict with the Samba share files. I would suggest you to check the files in your system and remove all Samba share files to solve this issue.

Tech support for more issues- microsoft word troubleshooting

0 Likes

#19

This solution fixed the problem for me (Sublime Text 3 Build 3126). I am not using Samba for this particular project, but rather an SSHFS mount using WinSSHFS on (OS: Windows 7 64 bit). Thank you!

0 Likes