Atom: After 2.0.8 does not display the repository icon

Created on 14 Jan 2017  路  14Comments  路  Source: file-icons/atom

Instead, display the classic folders icon.
Problem occurs in version 2.0.8 and 2.0.9.
I fell back to version 2.0.7 and the problem disappeared.

For some reason, instead of the class "icon-repo" appears the class "icon-file-directory" in tree-view layout.

atom-fs bug

All 14 comments

Screenshot, please.

The problem appeared after package update and Atom restart.
v207
v209

Odd. Does emptying the cache and restarting help...?

Did not help, unfortunately. If i replace "icon-file-directory" to "icon-repo" in inspector, then repository icon appears. But, obviously, after restarting disappeared again.

Are other Git projects affected? What happens if you remove the node project folder and add it again?

@hellfish2 Is this what you were talking about in #513?

Any git projects affected. After removing and adding the project, appeared "file-directory" icon again. I even tried to reinstall Atom, it did not help. But everything works fine on version 2.0.7.

*sigh* This will be hard to pinpoint...

First, run this in your console:

~js
var AtomFS = require(atom.packages.activePackages["file-icons"].path + "/lib/filesystem/filesystem.js");
console.log(AtomFS.paths);
~

Then click the Map and locate the entry for the root project. In your case, it'll look something like {"J:\OpenServer\dmn\localhost\node-dev\wp-content\themes\node" => Directory}. Open it and screenshot what you see. Here's what I'm seeing for file-icons when open in Atom:

Figure 1

Here it is.
console_result

Ah-HAH. Makes sense now.

@SologubVS I pushed a fix. Can you clone from master and tell me if it works?

~~~bash

Close Atom, then run these steps in your terminal:

git clone https://github.com/file-icons/atom.git file-icons
cd file-icons
apm install . && apm link .

Start Atom

atom
~~~

Yes! Now displays the correct icon, thanks!

This was the reason it wasn't working:

~js
const isRepository = repoPath === resourcePath;
~

Which, of course, is always going to be false if:

~js
const resourcePath = "J:\OpenServer\dmn\localhostnode-dev\wp-content\themesnode";
const repoPath = "J:/OpenServer/dmn/localhost/node-dev/wp-content/themes/node";
~

@SologubVS You should see this fixed in v2.0.10. :) Please let me know if you see it again.

@Alhadis I saw, thanks! I let you know, of cause. Now all is well.

Was this page helpful?
0 / 5 - 0 ratings