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

After 2.0.8 does not display the repository icon #518

Closed
SologubVS opened this issue Jan 14, 2017 · 14 comments
Closed

After 2.0.8 does not display the repository icon #518

SologubVS opened this issue Jan 14, 2017 · 14 comments
Labels
atom-fs Filesystem-related issues to address when developing a stable release of the `atom-fs` module. bug Confirmed defect in package logic, deprecation notices, and PRs which fix them.

Comments

@SologubVS
Copy link

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.

@Alhadis
Copy link
Member

Alhadis commented Jan 14, 2017

Screenshot, please.

@SologubVS
Copy link
Author

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

@Alhadis
Copy link
Member

Alhadis commented Jan 14, 2017

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

@SologubVS
Copy link
Author

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.

@Alhadis
Copy link
Member

Alhadis commented Jan 14, 2017

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?

@SologubVS
Copy link
Author

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.

@Alhadis
Copy link
Member

Alhadis commented Jan 14, 2017

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

First, run this in your console:

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

@SologubVS
Copy link
Author

Here it is.
console_result

@Alhadis
Copy link
Member

Alhadis commented Jan 14, 2017

Ah-HAH. Makes sense now.

Alhadis added a commit that referenced this issue Jan 14, 2017
@Alhadis
Copy link
Member

Alhadis commented Jan 14, 2017

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

# 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

@SologubVS
Copy link
Author

Yes! Now displays the correct icon, thanks!

@Alhadis
Copy link
Member

Alhadis commented Jan 14, 2017

This was the reason it wasn't working:

const isRepository = repoPath === resourcePath;

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

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

@Alhadis
Copy link
Member

Alhadis commented Jan 19, 2017

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

@SologubVS
Copy link
Author

SologubVS commented Jan 20, 2017

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

@Alhadis Alhadis added bug Confirmed defect in package logic, deprecation notices, and PRs which fix them. atom-fs Filesystem-related issues to address when developing a stable release of the `atom-fs` module. labels Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
atom-fs Filesystem-related issues to address when developing a stable release of the `atom-fs` module. bug Confirmed defect in package logic, deprecation notices, and PRs which fix them.
Projects
None yet
Development

No branches or pull requests

2 participants