Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 5f99e6b

Browse files
srawlinstvolkert
authored andcommitted
Fix impl of memory directory's _renameSync. (#66)
1 parent 99baf36 commit 5f99e6b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/src/backends/memory/memory_directory.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class _MemoryDirectory extends _MemoryFileSystemEntity
7171
Future<Directory> rename(String newPath) async => renameSync(newPath);
7272

7373
@override
74-
Directory renameSync(String newPath) => _renameSync(
74+
Directory renameSync(String newPath) => _renameSync<_DirectoryNode>(
7575
newPath,
7676
validateOverwriteExistingEntity: (_DirectoryNode existingNode) {
7777
if (existingNode.children.isNotEmpty) {

lib/src/backends/memory/memory_file_system_entity.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ abstract class _MemoryFileSystemEntity implements FileSystemEntity {
207207
/// If [checkType] is specified, it will be used to validate that the file
208208
/// system entity that exists at [path] is of the expected type. By default,
209209
/// [_defaultCheckType] is used to perform this validation.
210-
FileSystemEntity _renameSync(
210+
FileSystemEntity _renameSync<T extends _Node>(
211211
String newPath, {
212-
_RenameOverwriteValidator<_Node> validateOverwriteExistingEntity,
212+
_RenameOverwriteValidator<T> validateOverwriteExistingEntity,
213213
bool followTailLink: false,
214214
_TypeChecker checkType,
215215
}) {

0 commit comments

Comments
 (0)