Commit 82e9b230 authored by Leo Iannacone's avatar Leo Iannacone

do no try catch, but if instead

parent 88235911
......@@ -4,11 +4,9 @@ config = require("./config")
Tail = require("./tail")
_check_no_backward = (backward_path) ->
try
if typeof backward_path is 'string'
return backward_path.indexOf("..") < 0
catch err
return true
return
check_data_distribution = (data) ->
_check_no_backward(data) and
......@@ -102,6 +100,7 @@ generic_handler_watcher = (event_name, socket, data, watch_path, callback) ->
callback event_name, socket, data
watch_path_onsocket event_name, socket, data, watch_path, callback
send_distributions = (socket) ->
get_files_list config.debomatic.path, true, (directories) ->
distributions = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment