Some stuff

This commit is contained in:
Thomas FORGIONE
2015-06-23 14:05:40 +02:00
parent 5ba5f57261
commit 6242e6f122
3 changed files with 6 additions and 5 deletions

View File

@@ -239,14 +239,15 @@ geo.MeshStreamer.prototype.start = function(socket) {
console.log('Asking for ' + path);
var regex = /.*\.\..*/;
var filePath = path.substring(1, path.length);
if (regex.test(path)) {
if (regex.test(filePath)) {
socket.emit('refused');
socket.disconnect();
return;
}
self.loadFromFile(path, function() {
self.loadFromFile(filePath, function() {
socket.emit('ok');
});