check directory exists
This commit is contained in:
@@ -49,11 +49,13 @@ final profileMozillaDirectoryTransformer =
|
|||||||
handleData: (entity, sink) {
|
handleData: (entity, sink) {
|
||||||
final mozillaDir = Directory(p.join(entity.path, 'mozilla'));
|
final mozillaDir = Directory(p.join(entity.path, 'mozilla'));
|
||||||
|
|
||||||
for (final entity in mozillaDir.listSync()) {
|
if (mozillaDir.existsSync()) {
|
||||||
if (entity is Directory) {
|
for (final entity in mozillaDir.listSync()) {
|
||||||
final profile = p.basename(entity.path);
|
if (entity is Directory) {
|
||||||
if (profile.endsWith('.default')) {
|
final profile = p.basename(entity.path);
|
||||||
sink.add(entity);
|
if (profile.endsWith('.default')) {
|
||||||
|
sink.add(entity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user