Skip to content

Error on --static-dir if dir is empty #1599

@relikd

Description

@relikd

Version:

  • listmonk: v2.5.1
  • OS: alpine

Description of the bug and steps to reproduce:

--static-dir should either ignore missing directories, or create them on the fly.

Using the following docker-compose:

app:
  command:
      - ./listmonk
      - --static-dir=./static
  volumes:
      - ./static:/listmonk/static

with an empty static dir will result in an error:

failed reading static files from disk: './static': stat static/email-templates: no such file or directory

I dont need the other template dirs if I only want to overwrite the favicon or logo.svg.
As a workaround it suffices to re-create the directory structure.

PS. I think the Templating Readme needs an update too.
/static/public/ should be /static/public/templates ??

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions