Skip to content

Commit

Permalink
- t f fix issue with range on windows during get directory path
Browse files Browse the repository at this point in the history
  • Loading branch information
yelmuratoff committed Jun 30, 2024
1 parent 4d3b766 commit 44f2fef
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ class FilePathExtractor {
filePath = Uri.tryParse('file:///${match.group(1)!}')!.toFilePath();
}

final directoryPath = filePath.substring(0, filePath.lastIndexOf('/'));
final separator = isWindows ? '\\' : '/';
final directoryPath =
filePath.substring(0, filePath.lastIndexOf(separator));
return directoryPath;
} else {
throw FileNotFoundException(
Expand Down

0 comments on commit 44f2fef

Please sign in to comment.