File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-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,12 @@ 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+ v8::Local<v8::Value> argv[] = { v8::String::NewFromUtf8 (isolate, outputDir. c_str () ) };
4041 headless::zipFunction->Call (1 , argv);
4142}
4243
@@ -53,7 +54,7 @@ void stop() {
5354}
5455
5556void zip (const char * dir) {
56- outputDir = dir;
57+ outputDir = std::string ( dir) ;
5758 uv_async_send (&async_zip);
5859}
5960
You can’t perform that action at this time.
0 commit comments