File is displayed as folder in tree view


#1

When you open a file via double-clicking on it in Windows explorer Atom shows it as if it was a folder in the tree view, e.g. see this:

Is this intentional?


#2

I haven’t seen this before, and I don’t think that’s intentional.
How have you set up your file associations to allow atom to open php files via double-click?


#3

Happens to me too. I thought it was intended.

When I open a single file in atom with no other atom window open:

  1. open windows explorer
  2. right click a file, open with atom
  3. file appears as folder in tree view

I’m on 1.0.7 windows. but has happened for a while and on windows and Linux.


#4

I’ve had the same for a long time, I always assumed it tried to automatically add the file as a root in the Tree View and since it is a file it has no children to display. It occurs for me any time I open a new file when there are no other folders in the Tree View.

Reproduction Steps:

  1. Open Atom, e.g. with atom --dev --safe.
  2. Close all open files and remove all folders from the Tree View.
  3. File -> Open Your Config.

Expected:

Atom opens the user’s ~/.atom/config.coffee and the Tree View remains empty.

Actual:

Atom opens the user’s ~/.atom/config.coffee and the Tree View is populated with a config ‘folder’ as root. Clicking on this item toggles between the expanded and collapsed status arrow on the folder but has no other effect. Double clicking it does not open the file.

Windows 10 Build 10240, Atom v1.0.8-927ec7a.


#5

Interesting. I just noticed that I never actually do that. I always open Atom directly by itself, or on command line giving it a folder.
I can’t remember ever giving it just one file.

If this is consistent behavior, I’m guessing the tree-view package will have an open issue for this (can’t check right now).


#6

Sony for writing in old post but as the bug is still present i feel the need to inquire about possible fix.

its 2017 and this bug still happens any way to fix it? File tab is also not showing when opened. I can still edit the file and save changes but it will not display in opened file tabs. It is a bit annoying when i have to work with 2 files at the same time. As switching to different file will force me to open buged one from file list manually net time i have to edit it.


#7

Are belonging-info/ and belongings/ in the same folder? Because if they are, you could try adding that folder and see what happens.


#8

Managed to fix the issue by creating new html file and copying content from old one. Is it possible that previously instead of file folder was created and used as file?