Skip to content

Commit

Permalink
Fix filename handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Nov 18, 2012
1 parent de4df12 commit 224d031
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/url.js
Expand Up @@ -97,7 +97,7 @@ module.exports = function(options) {
return imageInfo.literal = literalNode(lookup.href);
} else if (lookup.length === 1) {
// Only one output
return imageInfo.literal = outputPath(lookup[0], url.href, options);
return imageInfo.literal = outputPath.call(this, lookup[0], url.href, options);
} else {
// Multiple outputs here, add a placeholder that we can replace on output
return imageInfo.literal = literalNode('stylusImages://' + imageInfo.id);
Expand Down Expand Up @@ -194,7 +194,6 @@ function outputPath(resolution, id, options) {
// If copy files flag is true and not an absolute url
if (options.copyFiles && !/^\//.test(resolution.href)) {
var relativeDir = dirname(resolution.href),
// TODO : Do something about this.filename reference
outputDir = options.outdir || dirname(this.filename),
components = relativeDir.split('/');

Expand Down

0 comments on commit 224d031

Please sign in to comment.