Skip to content

Commit

Permalink
core: few naming tweaks after last commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctalkington committed Mar 27, 2014
1 parent 6f2e77f commit c02bd21
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/modules/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Archiver.prototype.bulk = function(mappings) {
}, data);

self._queue.add({
data:fileData,
data: fileData,
source: util.lazyReadStream(filepath)
});
});
Expand All @@ -175,24 +175,24 @@ Archiver.prototype.bulk = function(mappings) {
return this;
};

Archiver.prototype.file = function(filepath, data) {
data = this._normalizeFileData(data);
Archiver.prototype.file = function(filepath, fileData) {
fileData = this._normalizeFileData(fileData);

if (typeof filepath !== 'string' || filepath.length === 0) {
this.emit('error', new Error('filepath must be a non-empty string value'));
return this;
}

if (util.file.isFile(filepath)) {
if (typeof data.name !== 'string' || data.name.length === 0) {
data.name = util.sanitizePath(filepath);
if (typeof fileData.name !== 'string' || fileData.name.length === 0) {
fileData.name = util.sanitizePath(filepath);
}

data.source = filepath;
data.sourceType = 'stream';
fileData.source = filepath;
fileData.sourceType = 'stream';

this._queue.add({
data: data,
data: fileData,
source: util.lazyReadStream(filepath)
});
} else {
Expand Down

0 comments on commit c02bd21

Please sign in to comment.