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

DIR of temporary files is not created #75

Open
JiffB opened this issue Aug 21, 2021 · 0 comments
Open

DIR of temporary files is not created #75

JiffB opened this issue Aug 21, 2021 · 0 comments

Comments

@JiffB
Copy link

JiffB commented Aug 21, 2021

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

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