-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
Description
Future<bool> _isConsolidatableExternalLink(
Link link, String libraryRootPath) async {
final targetPath = link.resolveSymbolicLinksSync();
// A link is NOT consolidatable if it points inside the library itself.
final isInsideLibrary = path_lib.equals(targetPath, libraryRootPath) ||
path_lib.isWithin(libraryRootPath, targetPath);
if (isInsideLibrary) return false;
// A link is NOT consolidatable if it points to an ancestor of the library.
// This would create a recursive loop where the library tries to consolidate
// its own parent directory.
final isAncestorOfLibrary = path_lib.isWithin(targetPath, libraryRootPath);
if (isAncestorOfLibrary) return false;
return true;
}Metadata
Metadata
Assignees
Labels
area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.