Commit 5682fd79 authored by Leo Iannacone's avatar Leo Iannacone

set correctly files information

parent 61f1cb28
...@@ -35,20 +35,19 @@ function get_files_list_from_pacakge(package_path, callback) { ...@@ -35,20 +35,19 @@ function get_files_list_from_pacakge(package_path, callback) {
package_info.debs = [] package_info.debs = []
package_info.archives = [] package_info.archives = []
files.forEach(function (f) { files.forEach(function (f) {
extension = f.split('.').pop(); file = {}
if (extension == "deb" || extension == "ddeb") file.path = path.join(pack_path, f).replace(config.debomatic_path, config.debomatic_webpath)
package_info.debs.push(f); file.orig_name = f
else if (f.indexOf('.tar') >= 0) { file.name = f.split('_')[0]
archive = {} file.label = f.replace(file.name + '_', '')
archive.name = f file.extension = f.split('.').pop();
archive.path = path.join(package_path, f) if (file.extension == "deb" || file.extension == "ddeb")
package_info.archives.push(archive) package_info.debs.push(file);
else if (f.indexOf('.tar') >= 0 || file.extension == "changes" || file.extension == "dsc") {
package_info.archives.push(file)
} }
else { else {
file = {} file.label = file.extension
file.name = f
file.path = path.join(package_path, f)
file.label = extension
package_info.files.push(file) package_info.files.push(file)
} }
}); });
......
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