directory-sync
Advanced tools
Comparing version 2.0.1 to 2.0.2
{ | ||
"name": "directory-sync", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Easily synchronize directories between two machines over the internet.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -161,2 +161,5 @@ import Path from 'path'; | ||
// Retrieve the Directory Map record for this uri | ||
const record = map.get(uri); | ||
// Match the incoming request to one of the supported operations | ||
@@ -170,3 +173,3 @@ let body; | ||
// Ensure that the uri has a valid record in our map | ||
if (map.get(uri) === undefined) | ||
if (record === undefined) | ||
return response.status(404).json({ | ||
@@ -227,3 +230,3 @@ code: 'NOT_FOUND', | ||
if (output instanceof Stream.Readable) { | ||
return output.pipe(response.writable); | ||
return response.stream(output, record.stats.size); | ||
} else { | ||
@@ -230,0 +233,0 @@ // Send a 'SUCCESS' code response with any output as that data |
71347
1590