File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1717
1818#include " headlessutils.h"
1919#include < iostream>
20+ #include < string>
2021#include " nan.h"
2122#include " uv.h"
2223
@@ -31,12 +32,13 @@ void setZipFunction(Nan::Callback* zF) {
3132uv_async_t async_zip;
3233
3334uv_loop_t * loop;
34- const char * outputDir;
35+ std::string outputDir;
3536
3637void asyncfunc (uv_async_t * handle) {
3738 Nan::HandleScope scope;
3839 v8::Isolate* isolate = v8::Isolate::GetCurrent ();
39- v8::Local<v8::Value> argv[] = { v8::String::NewFromUtf8 (isolate, outputDir) };
40+ printf (" outputdir in asyncfunc is %s\n " , outputDir.c_str ());
41+ v8::Local<v8::Value> argv[] = { v8::String::NewFromUtf8 (isolate, outputDir.c_str ()) };
4042 headless::zipFunction->Call (1 , argv);
4143}
4244
@@ -53,7 +55,8 @@ void stop() {
5355}
5456
5557void zip (const char * dir) {
56- outputDir = dir;
58+ printf (" Headless utils: Outputdir = %s\n " , dir);
59+ outputDir = std::string (dir);
5760 uv_async_send (&async_zip);
5861}
5962
You can’t perform that action at this time.
0 commit comments