Skip to content

Commit

Permalink
home: browse: fix directory/file distinction on web
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed Jul 29, 2022
1 parent 98c6a94 commit 4b4f5cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/data/file_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ abstract class FileManager {
filePath = _sanitisePath(filePath);
if (kIsWeb) {
final prefs = await _prefs;
print("filePath: ${filePath + Editor.extension}");
return !prefs.containsKey(filePath + Editor.extension);
} else {
final Directory directory = Directory(await _documentsDirectory + filePath);
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/home/browse.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class _BrowsePageState extends State<BrowsePage> {
} else {
failed = children.isEmpty;
for (String child in children) {
if (await FileManager.isDirectory("${path ?? '/'}/$child")) {
if (await FileManager.isDirectory("${path ?? ''}/$child")) {
directoryPaths.add(child);
} else {
filePaths.add(child);
Expand Down

0 comments on commit 4b4f5cf

Please sign in to comment.