8000 Inconsistent user directory searches · Issue #7861 · jgm/pandoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Inconsistent user directory searches #7861
Closed
@evenbrenden

Description

@evenbrenden

Consider the following directory layout:

├── datadir
│   └── templates
│       └── my-templates
│           └── my-template.html
│   └── defaults
├── my-template.html
├── my-defaults.yaml

Standing at the root of this layout, pandoc --data-dir=datadir --defaults=../../my-defaults.yaml will load my-defaults.yaml from outside of the user directory $DATADIR. This might be the case for other file types too.

On the other hand, pandoc --data-dir=datadir --template=../../my-template.html will not load my-template.html. Neither will pandoc --data-dir=datadir --template=my-templates/my-template.html. Templates loaded from under $DATADIR must lie in $DATADIR/templates and may not lie in subdirectories of $DATADIR/templates. This might be the case for other file types too.

This is inconsistent and pandoc should either:

  • Allow any files to be loaded outside of $DATADIR.
  • Only allow files in a set subdirectory of $DATADIR to be loaded.
  • Only allow files in subdirectories of a set subdirectory of $DATADIR to be loaded.

Here, "a set subdirectory" could be ./, depending on the file type.

Related: #5987

pandoc 2.14.0.3 on NixOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0