Skip to content

Don't hardcode download directory location #92

Description

@burrscurr

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions