Fix OS::GetExecutablePath for platform_none
authorRyan Dahl <ry@tinyclouds.org>
Tue, 16 Nov 2010 03:06:18 +0000 (03:06 +0000)
committerRyan Dahl <ry@tinyclouds.org>
Tue, 16 Nov 2010 03:06:18 +0000 (03:06 +0000)
src/node.cc
src/platform_none.cc

index eddd786..17fc8ef 100644 (file)
@@ -1648,7 +1648,7 @@ static void Load(int argc, char *argv[]) {
     // as a last ditch effort, fallback on argv[0] ?
     process->Set(String::NewSymbol("execPath"), String::New(argv[0]));
   } else {
-    process->Set(String::NewSymbol("execPath"), String::New(execPath));
+    process->Set(String::NewSymbol("execPath"), String::New(execPath, size));
   }
 
 
index 420efe1..753fc03 100644 (file)
@@ -30,7 +30,7 @@ int OS::GetMemory(size_t *rss, size_t *vsize) {
 
 int OS::GetExecutablePath(char *buffer, size_t* size) {
   *size = 0;
-  return 0;
+  return -1;
 }
 
 }  // namespace node