Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Less dependencies for screenshot getter

  • Loading branch information...
commit ddcd6bd95cbfee780236865495305d695dcd6817 1 parent b40e03d
@tomas tomas authored
View
4 lib/prey/plugins/providers/lan/index.js
@@ -27,7 +27,9 @@ var Lan = function(){
var nodes = [];
var skip = ['WORKGROUP', '..__MSBROWSE__.'];
- Network.get('active_network_interface', function(nic){
+ Network.get('active_network_interface', function(err, nic){
+
+ if(err) return callback(err);
var command = 'nmblookup -A ' + nic.broadcast_address;
View
6 lib/prey/plugins/providers/screenshot/index.js
@@ -8,8 +8,8 @@
var common = require('./../../../common'),
tempfile_path = common.helpers.tempfile_path,
util = require('util'),
- path = require('path'),
- exec = require('child_process').exec,
+ path_exists = require('path').exists,
+ // exec = require('child_process').exec,
os_functions = require('./platform/' + common.os_name),
Getters = require('./../../../getters');
@@ -31,7 +31,7 @@ var Screenshot = function(){
if(err) return callback(err);
- path.exists(file_path, function(exists){
+ path_exists(file_path, function(exists){
if(exists)
callback(null, {file: file_path, content_type: 'image/jpeg'});
else
Please sign in to comment.
Something went wrong with that request. Please try again.