Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
server: make templating work with the new file revision system
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Sep 25, 2015
1 parent 4779db8 commit 575a028
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ module.exports = function(base, substitutions) {
/* Is that really a file? We just check if we have a '/' */
if (file.indexOf('/') !== -1) {
/* We may want to match the appropriate file on the FS. We should be async, but... */
var matches = glob.sync(path.resolve(base,
var ext = path.extname(file),
matches = glob.sync(path.resolve(base,
path.dirname(file),
'*' + path.basename(file)));
'*' + path.basename(file, ext) + '*' + ext));
if (matches.length > 0) {
file = path.relative(base, matches[0]);
}
Expand Down

0 comments on commit 575a028

Please sign in to comment.