Osmose / advanced-open-file

Open files and folders in Atom easily.
https://atom.io/packages/advanced-open-file
Other
118 stars 20 forks source link

Uncaught Error: EACCES: permission denied, mkdir '/src' #67

Closed kwhitaker closed 8 years ago

kwhitaker commented 8 years ago
  1. Tried to create a new file in an existing directory within my project root (project/src/some-new-file.js)

Atom Version: 1.1.0 System: Mac OS X 10.11.1 Thrown From: advanced-open-file package, v0.12.0

Stack Trace

Uncaught Error: EACCES: permission denied, mkdir '/src'

At /Users/kevinwhitaker/.atom/packages/advanced-open-file/lib/models.js:119

Error: EACCES: permission denied, mkdir '/src'
  at Error (native)
  at Object.fs.mkdirSync (fs.js:799:18)
  at Function.sync (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babel-core/node_modules/output-file-sync/node_modules/mkdirp/index.js:71:13)
  at Path.createDirectories (/Users/kevinwhitaker/.atom/packages/advanced-open-file/lib/models.js:141:37)
  at AdvancedOpenFileController.openPath (/Users/kevinwhitaker/.atom/packages/advanced-open-file/lib/controller.js:137:22)
  at AdvancedOpenFileController.selectPath (/Users/kevinwhitaker/.atom/packages/advanced-open-file/lib/controller.js:103:22)
  at AdvancedOpenFileController.confirm (/Users/kevinwhitaker/.atom/packages/advanced-open-file/lib/controller.js:211:22)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:528:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:351:22)
  at HTMLDocument.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:20)

Commands

     -1:24.2.0 settings-view:open (atom-pane.pane.active)
  5x -0:40.4.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:23.3.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -0:22 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:06.5.0 advanced-open-file:toggle (atom-pane.pane.active)
     -0:05.1.0 advanced-open-file:autocomplete (atom-text-editor.path-input.editor.mini.is-focused)
     -0:01.6.0 core:confirm (atom-text-editor.path-input.editor.mini.is-focused)
     -0:00.4.0 editor:consolidate-selections (atom-text-editor.path-input.editor.mini.is-focused)
     -0:00.4.0 core:cancel (atom-text-editor.path-input.editor.mini.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "base16-tomorrow-dark-theme"
    ],
    "disabledPackages": [
      "open-last-project",
      "autocomplete"
    ],
    "destroyEmptyPanes": false
  }
}

Installed Packages

# User
advanced-open-file, v0.12.0
file-icons, v1.6.11
highlight-line, v0.11.0
javascript-snippets, v1.0.0
language-cjsx, v0.3.0
language-docker, v1.1.3
language-haml, v0.23.5
language-jade, v0.6.2
language-javascript-jsx, v0.3.7
linter, v1.10.0
linter-coffeelint, v1.1.2
linter-eslint, v4.0.0
react, v0.12.10
ruby-slim, v0.2.0
save-session, v0.15.7

# Dev
No dev packages
Osmose commented 8 years ago

Thanks for the report!

I'm wondering if the bug here is that we don't show a helpful message for permission errors, or if we're creating files wrong in some way. Are you able to create the directory manually with the same user that was running Atom?

kwhitaker commented 8 years ago

@Osmose that I am. Also, once I manually created a file in the src directory, I was able to use AOF to create other files just fine.

Osmose commented 8 years ago

wat

Oh, I see that it tried to make /src. Hmm, were you using relative paths when you hit the failure? I could totally see a bug where we forget to absolutify the path before passing it to mkdirp.

kwhitaker commented 8 years ago

Honestly I can't recall offhand - it's been a few hours. I'll keep an eye on it and update if it happens in the future.

cjbottaro commented 8 years ago

Same issue here. Yes, it happens when trying to use a relative path.

Osmose commented 8 years ago

Same issue here. Yes, it happens when trying to use a relative path.

Cool, thanks for the info!

Should be fixed in master now. I'll do another release before I drop off tonight, and if one of you could verify that the new release is working for you I'd appreciate it. :D