Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't hardcode download directory location #92

Open
burrscurr opened this issue May 3, 2021 · 0 comments
Open

Don't hardcode download directory location #92

burrscurr opened this issue May 3, 2021 · 0 comments

Comments

@burrscurr
Copy link

Background

My downloads folder is not the default ~/Downloads, but (for reasons of personal preference) ~/personal/downloads. This customization is possible by setting XDG user directories (here: XDG_DOWNLOAD_DIR).

Problem

bbb-recorder assumes that files get downloaded to ~/Downloads (line in code). However, Chrome honors XDG_DOWNLOAD_DIR and does not download the file to the location expected by bbb-recorder. Therefore, running node export.js <bbb url> any.web 10 causes an error:

{ Error: ENOENT: no such file or directory, copyfile '/home/<user>/Downloads/any.webm' -> '<target path omitted>'
    at Object.copyFileSync (fs.js:1728:3)
    at copyOnly (<path omitted>/bbb-recorder/export.js:227:12)
    at main (<path omitted>/bbb-recorder/export.js:145:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  errno: -2,
  syscall: 'copyfile',
  code: 'ENOENT',
  path: '/home/<user>/Downloads/any.webm',
  dest: '<target path omitted>' }

(the omitted target path does exist and is writable)

Proposed Solution

bbb-recorder should look for downloaded recordings at the path chrome downloads them. Since chrome honors XDG customizations, bbb-recorder should also.

Maybe folder/xdg could be used for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant