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

Fix impl of memory directory's _renameSync. #66

Merged
merged 5 commits into from
Jan 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/backends/memory/memory_directory.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class _MemoryDirectory extends _MemoryFileSystemEntity
Future<Directory> rename(String newPath) async => renameSync(newPath);

@override
Directory renameSync(String newPath) => _renameSync(
Directory renameSync(String newPath) => _renameSync<_DirectoryNode>(
newPath,
validateOverwriteExistingEntity: (_DirectoryNode existingNode) {
if (existingNode.children.isNotEmpty) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/backends/memory/memory_file_system_entity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ abstract class _MemoryFileSystemEntity implements FileSystemEntity {
/// If [checkType] is specified, it will be used to validate that the file
/// system entity that exists at [path] is of the expected type. By default,
/// [_defaultCheckType] is used to perform this validation.
FileSystemEntity _renameSync(
FileSystemEntity _renameSync<T extends _Node>(
String newPath, {
_RenameOverwriteValidator<_Node> validateOverwriteExistingEntity,
_RenameOverwriteValidator<T> validateOverwriteExistingEntity,
bool followTailLink: false,
_TypeChecker checkType,
}) {
Expand Down