-
Notifications
You must be signed in to change notification settings - Fork 250
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
Files with the same name sometimes end up with the wrong icon #499
Comments
Eh? Bizarre. Do the
|
They do not appear to, the two files in the above example that you can't see the extension on and have the database icons are I was also seeing some files with the same name as a folder and having an extension getting a folder icon and wouldn't open properly causing no tab to appear in the window. But either the update to 2.0.7 for file icons or the update of Atom itself to 1.12.8 appears to have corrected that one. |
I should probably also mention I noticed this is a Windows 10 system, if it matters ;) |
Could I convince you to send me that folder so I can inspect this on my end, or is that too much trouble?
No, I fixed that issue with the most recent patch. |
Unfortunately due to the confidentiality of the project the files pertain to I'm not sure, I'll ask around and see what some of the others think. |
Are you able to replicate the bug with some non confidential files? |
Let me see if I can slap something together later today |
Here's a zip of some files that produce it, I've stripped them down to next to nothing in them but it produces the issue. At least some of the time. I have noticed though that after editing the files, then reverting them in via git it seems to have fixed the problem for the affected files. So maybe that is the key? It's a strange issue anyways :S. |
We currently have no way to track changes that happen to files outside Atom. This is something I intend to fix in a future release, but it's also not something to be taken lightly. Monitoring too many files for changes can risk blowing the process's I can't see or reproduce anything unusual with these files... :\ I may need to add some package commands to generate diagnostics, because I can't keep pestering you guys with aimless questions.. |
A similar issue happened to me yesterday, where newly created folders & files would end up with a wrong icon and it wasn't possible to open those files in the editor, as it would just switch to an empty tab with no name or switch to the previous open tab when I clicked on the file. However, this issue appeared to be completely random, as it would happen maybe 4 out of 10 times when creating a new file through the editor's tree view or directly from the command line. The only common thing was that all the broken files & folders were using the same icon, which looked similar to the default Windows 10 folder icon (a 90deg rotated version of the actual folder icon). I'll try to provide some images & further details, if it happens again. |
I don't know if it might be of any help, but on file-icons 2.0.14 I'm getting this behavior:
This doesn't happen the other way around (first create the file, delete, then the folder). Something to do with caching the icons? |
Well picked up! You're right; the caching is done using the whole path, so if the folder you created was named Note that collapsing and reopening the containing directory in tree-view will actually refresh the icon. Will fix; track #490 for updates. |
So here's a new one to throw into this, it doesn't appear to just be the same file name. I have three files in a folder:
The last two have the html5 icon, as well in another folder there's two files with the same name but different extensions one of them has a folder icon. When it's opened it doesn't create a tab. Is it possible there's some kind of memory/index collision happening? Collapsing and re-opening folders doesn't seem to change anything. As well one folder "settings" is getting an icon that looks like switches (probably because of it's name) when you leave a file inside of it open and restart atom. |
@UndefinedOffset Open devtools, and run this in the console: _FileIcons.fs.FileSystem.paths You should be presented with a Map of system paths keyed to filesystem resources (a
A folder named "settings", you mean? Did another file of that name exist in that location previously? FYI, the switches-icon is intentional: it's a "best guess"-type pattern which is used when nothing else matches (so a more appropriate icon than a blank page can be picked). |
So this is interesting using the command you suggested running in the console has some interesting keys most are either a File or Directory but some are undefined incidentally these one's have the wrong icon. In the case of the form-panel.yml and video-hero-panel.yml their .feature counterparts are missing from the map. In the case of test-page.html it there is no file named similarly. As for the main-navigation.feature flagged as a directory I'm not sure what's going on there there could have been at one time a folder called main-navigation but if there was it's been gone for awhile. The paths look fine, though it does switch between the windows \ and unix / but normally that doesn't cause issues in most other programs. In the case of the folder named "settings" when leaving a file inside of it opened and restarting atom it's also flagged as undefined with the two children keys 0 and 1 (see below, I cut out some non-applicable files/directories from the image) So maybe the undefined is a clue as to the issue, also there are no errors in the console when either issue happens. |
Pretty much falls in line with #563. If you read the discussion there you'll see that stuff will become less flaky once a few In other words, it's a known issue. |
Just tell me if it's possible to install Ubuntu on a 2 TB external hard-drive that I can install and run Atom on, because I haven't been very lucky compiling Electron/Atom on OpenBSD yet. 😜 Suffice to say these issues are known to me, but state of available hardware is making everything hard. |
Not sure I follow... you are working on an Atom plugin, but you are unable to run Atom on your machine? 😄 My problem is on OS X, if it helps. |
To cut a long story very short: my MacBook died late last November/early December, leaving me with a bulky old dell running OpenBSD. Since I'm too penniless to afford a new computer, everything Atom-related that isn't urgent has been forced onto the backburner until I can figure out how to build the thing on this system. Everything Atom-related that HAS been urgent has involved a song-and-dance routine of borrowing computers, running around with USB sticks in my pocket containing various SSH keys, and basically not exactly succeeding at life much lately. 😁 |
Heh, that does explain! |
Using atom 1.12.8 and file icons 2.0.7 it looks like when two files are named the same with different extensions they can get the wrong icon. See screenshot, the files in it are a mix of
.feature
and.yml
files it doesn't appear to happen to all files just some. So the duplicate name may not be the root of the issue.The text was updated successfully, but these errors were encountered: