onivim/oni

Oni can't open and operate with files/folder with special chars in name

Open

#2508 opened on Aug 16, 2018

View on GitHub
 (6 comments) (0 reactions) (0 assignees)TypeScript (11,389 stars) (336 forks)batch import
0.3.8buggood first issue

Description

Oni Version: 0.36 64bit zipped Operating System: Windows 7 64bit

Issue: Oni struggles to operate with any file/folder with a # char in name. I've stumbled on this issue because I have a couple of log files named like foo#1234.log. Fiddling around a little bit more I found also that issues arise with folders named with a #.
Ex: C:\path\#hashed\file.txt is opened as a blank tab in Oni. Error reported in dev tool console is:

Error: ENOENT: no such file or directory, stat 'C:\path#hashed\file.txt'
                                                       ^ notice the collapsed \

My best guess is there is some regex or glob snafu going on. Out of curiosity I've tried a bunch of special chars and the following have the same issue, but maybe there are others like funky emojis\unicodes or similar:

# % ^ & ; ` '

I guess these are some niche cases, but maybe this is a symptom of something bigger lurking in the file scan logic.

Let me now if I can do something else!

Steps to reproduce: Just create a bunch of files in a folder, name a few with a #, like #test.txt, Oni will not be able to open them.

Contributor guide