Skip to content

Commit dca768f

Browse files
authored
Merge pull request #1220 from dart-lang/change_generator
minor change to the html generator
2 parents e92c980 + 567fa4d commit dca768f

File tree

2 files changed

+7
-194
lines changed

2 files changed

+7
-194
lines changed

lib/src/html/html_generator_instance.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,15 @@ class HtmlGeneratorInstance implements HtmlOptions {
264264
}
265265

266266
void _writeFile(String filename, String content) {
267-
File f = _createOutputFile(out, filename);
268-
f.writeAsStringSync(content);
269-
_onFileCreated.add(f);
267+
File file = _createOutputFile(out, filename);
268+
file.writeAsStringSync(content);
269+
_onFileCreated.add(file);
270270
}
271271
}
272272

273273
File _createOutputFile(Directory destination, String filename) {
274-
File f = new File(path.join(destination.path, filename));
275-
if (!f.existsSync()) f.createSync(recursive: true);
276-
return f;
274+
File file = new File(path.join(destination.path, filename));
275+
Directory parent = file.parent;
276+
if (!parent.existsSync()) parent.createSync(recursive: true);
277+
return file;
277278
}

testing/test_package_docs/fake/paintImage.html

Lines changed: 0 additions & 188 deletions
This file was deleted.

0 commit comments

Comments
 (0)