Commit 61f1cb28 authored by Leo Iannacone's avatar Leo Iannacone

some comment

parent 354ca4cc
...@@ -50,6 +50,7 @@ io.sockets.on('connection', function(socket) { ...@@ -50,6 +50,7 @@ io.sockets.on('connection', function(socket) {
watchers = [] watchers = []
socket.set('view', data, function() { socket.set('view', data, function() {
packages_path = path.join(config.debomatic_path, data.distribution.name, 'pool') packages_path = path.join(config.debomatic_path, data.distribution.name, 'pool')
// watch on incoming packages
try { try {
watchIncomingPackages = fs.watch(packages_path, { persistent: true}, function(event, fileName) { watchIncomingPackages = fs.watch(packages_path, { persistent: true}, function(event, fileName) {
if (event == 'rename') if (event == 'rename')
...@@ -57,7 +58,7 @@ io.sockets.on('connection', function(socket) { ...@@ -57,7 +58,7 @@ io.sockets.on('connection', function(socket) {
}); });
watchers.push(watchIncomingPackages); watchers.push(watchIncomingPackages);
} catch (err) {} } catch (err) {}
// if user is viewing a package, watch package dir
if (data.package && data.package.name && data.package.version) { if (data.package && data.package.name && data.package.version) {
pack_path = path.join(packages_path, data.package.name + '_' + data.package.version); pack_path = path.join(packages_path, data.package.name + '_' + data.package.version);
try { try {
......
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