Skip to content

DIR of temporary files is not created #75

Description

@JiffB

Hi Jesse,

As this DIR isn't created (latest git), a call to wf_pandoc(…) fails with this error :

/var/tmp/scratch/tempfile_9999999999999999 openBinaryFile: does not exist (No such file or directory)

The following diffs are fixing that.
 
Move the scratch dir from "./scratch" (bad, where does it go?) to "/var/tmp/scratch" (good, well identified)
into: etc/simple_bridge.config

diff etc/simple_bridge.config_ORG etc/simple_bridge.config
45c45,46
<         {scratch_dir, "./scratch"}
---
> %%%%%%        {scratch_dir, "./scratch"}
>         {scratch_dir, "/var/tmp/scratch"}

BTW, there are a lot of useless space characters at the end of some lines in this file.
 
Check if the scratch DIR exist and if not, create it
into: lib/simple_bridge/src/simple_bridge_util.erl

diff simple_bridge_util.erl_ORG simple_bridge_util.erl
113c113,119
<         Other -> Other
---
>         %%%Other -> Other
>         Other ->
>             % +1 L: the DIR of temporaries is not auto-created, do it
>             %       otherwise a wf_pandoc(…) call will fail with :
>             %       openBinaryFile: does not exist (No such file or directory)
>             ok = filelib:ensure_dir(Other ++ "/"),
>             Other

Jean-Yves

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions