Skip to content

Commit 7a6d155

Browse files
committed
Fix: delete temp directory once done invocation
1 parent 1484893 commit 7a6d155

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## CHANGELOG
22

3-
### v0.1.11
3+
### v0.1.11 (2022-05-9)
44

5+
* Fix: delete temp directory once done invocation
56
* Maintenance: Update string_buffer dependency
67
* Added void to no arg functions
78
* Added static to internal functions

src/scriptexec.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ struct ScriptExecResult scriptexec_run_with_options(const char *script, struct S
131131

132132
// delete files
133133
remove(script_file);
134-
rmdir(dir_name);
135134
free(script_file);
136135

137136
// read out/err
@@ -140,6 +139,9 @@ struct ScriptExecResult scriptexec_run_with_options(const char *script, struct S
140139
result.err = _scriptexec_read_and_delete_text_file(err_file);
141140
free(err_file);
142141

142+
// delete temp directory
143+
rmdir(dir_name);
144+
143145
return(result);
144146
} /* scriptexec_run_with_options */
145147

0 commit comments

Comments
 (0)