sublime-import-helper icon indicating copy to clipboard operation
sublime-import-helper copied to clipboard

EACCES: permission denied

Open tukusejssirs opened this issue 3 years ago • 2 comments

Related: #106


@unlight, folder_exclude_patterns project config works when the user has at least read permissions all files and folders in a all project folders, even to those that are matching in folder_exclude_patterns.

I have a Docker folder with PostgreSQL data, which are owned by postgres user. I have added the folder into folder_exclude_patterns, but Import Helper still complains on startup / project opening.

Here’s the error:

Error: EACCES: permission denied, scandir '$repo_root/some/path'
    at Object.readdirSync (node:fs:1441:3)
    at NodeRuntimeFileSystem.readDirSync (~/.config/sublime-text/Packages/ImportHelper/backend_run.js:2153:30)
    at RealFileSystemHost.readDirSync (~/.config/sublime-text/Packages/ImportHelper/backend_run.js:2844:23)
    at TransactionalFileSystem.readDirSync (~/.config/sublime-text/Packages/ImportHelper/backend_run.js:3421:58)
    at getFileSystemEntries (~/.config/sublime-text/Packages/ImportHelper/backend_run.js:3844:43)
    at ~/.config/sublime-text/Packages/ImportHelper/backend_run.js:3829:20
    at visitDirectory (~/.config/sublime-text/Packages/ImportHelper/backend_run.js:24195:22)
    at visitDirectory (~/.config/sublime-text/Packages/ImportHelper/backend_run.js:24229:21)
    at visitDirectory (~/.config/sublime-text/Packages/ImportHelper/backend_run.js:24229:21)
    at visitDirectory (~/.config/sublime-text/Packages/ImportHelper/backend_run.js:24229:21)

I think we could check if we can access the file/folder in backend_run.js on line 24228.

tukusejssirs avatar Jun 07 '22 07:06 tukusejssirs

I'm not sure about the root of issue, but looks like typescript file system is trying to read it.

Can you try to add these folders to tsconfig exclude also?

unlight avatar Jun 12 '22 11:06 unlight

Sorry, @unlight, for late reply.

I’ve just tried to add the folder to exclude array in tsconfig and it seems to work as expected.

Thanks! :pray:

tukusejssirs avatar Sep 02 '22 08:09 tukusejssirs