Commit 9e0e02c6 authored by Leo Iannacone's avatar Leo Iannacone

send webpath with file

parent c7008c40
...@@ -38,7 +38,7 @@ function __get_files_list_from_package(data, callback) { ...@@ -38,7 +38,7 @@ function __get_files_list_from_package(data, callback) {
data.package.archives = [] data.package.archives = []
files.forEach(function (f) { files.forEach(function (f) {
file = {} file = {}
file.path = path.join(package_path, f).replace(config.debomatic.path, config.debomatic.webpath) file.path = path.join(package_path, f).replace(config.debomatic.path, config.routes.debomatic)
file.orig_name = f file.orig_name = f
file.name = f.split('_')[0] file.name = f.split('_')[0]
file.label = f.replace(file.name + '_', '') file.label = f.replace(file.name + '_', '')
...@@ -93,6 +93,7 @@ function __send_file (event_name, socket, data) { ...@@ -93,6 +93,7 @@ function __send_file (event_name, socket, data) {
if (err) return; if (err) return;
data.file.orig_name = file_path.split('/').pop() data.file.orig_name = file_path.split('/').pop()
data.file.content = content data.file.content = content
data.file.path = file_path.replace(config.debomatic.path, config.routes.debomatic)
socket.emit(event_name, data) socket.emit(event_name, data)
}); });
} }
......
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