Skip to content

Commit

Permalink
🐛 fixes #14 don't generate references for files like .DS_Store
Browse files Browse the repository at this point in the history
Signed-off-by: birjuvachhani <[email protected]>
  • Loading branch information
BirjuVachhani committed Mar 1, 2020
1 parent fb02304 commit c8da79f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Spider {
if (group.path.isEmpty) {
exit_with('Exmpty paths are not allowed');
}
if (File(group.path).existsSync()) {
if (!FileSystemEntity.isDirectorySync(group.path)) {
exit_with('Path ${group.path} is not a directory');
}
if (!Directory(group.path).existsSync()) {
Expand Down
1 change: 1 addition & 0 deletions lib/src/dart_class_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ ${properties_strings.join('\n')}
/// 2. should be from one of the allowed types if specified any
bool _isValidFile(dynamic file) {
return FileSystemEntity.isFileSync(file.path) &&
path.extension(file.path).isNotEmpty &&
(group.types.isEmpty ||
group.types.contains(path.extension(file.path)));
}
Expand Down

0 comments on commit c8da79f

Please sign in to comment.