mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 10:00:27 +00:00
perf: slow down DHT announcing on errors (#1186)
This commit is contained in:
17 files changed
+573
-563
No files matched your search
@@ -8,7 +8,13 @@ class FileExplorer {
|
||||
if (await FileSystemEntity.isFile(filePath)) {
|
||||
_openFile(filePath);
|
||||
} else if (await FileSystemEntity.isDirectory(filePath)) {
|
||||
_openDirectory(filePath);
|
||||
await _openDirectory(filePath);
|
||||
} else {
|
||||
// If file does not exist, open its parent directory
|
||||
final parentPath = path.dirname(filePath);
|
||||
if (await FileSystemEntity.isDirectory(parentPath)) {
|
||||
await _openDirectory(parentPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user