magbicaleman / open-in-browser

Atom.io Package
MIT License
51 stars 37 forks source link

Open file error when files named as "positon.html" | "scorrl.html" ... #44

Closed seasidesun closed 7 years ago

seasidesun commented 7 years ago

I named the file: position.html、scroll.html... When i opened these file with mune "Open in Browser", found the error below:

Error: Expected a target
Error: Expected a `target`
    at module.exports (/Users/sunhaibin/.atom/packages/open-in-browser/node_modules/opn/index.js:9:25)
    at Object.open (/Users/sunhaibin/.atom/packages/open-in-browser/lib/open-in-browser.coffee:22:5)
    at Object.openTreeView (/Users/sunhaibin/.atom/packages/open-in-browser/lib/open-in-browser.coffee:19:6)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:259:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1185:28)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:325:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Perhaps these file name is used by system so that lead to conflict.

magbicaleman commented 7 years ago

@seasidesun thank you for reporting, going to close this, because seems to be same issue as #43. May you please add in issues #43, what OS you're on.