minor
This commit is contained in:
parent
065a287f42
commit
2a91306532
1 changed files with 6 additions and 3 deletions
|
@ -55,7 +55,7 @@ class _ExplorerPageState extends State<ExplorerPage> {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
final path = widget.path;
|
final path = widget.path;
|
||||||
if (path != null) {
|
if (path != null && androidFileUtils.getStorageVolume(path) != null) {
|
||||||
_goTo(path);
|
_goTo(path);
|
||||||
} else {
|
} else {
|
||||||
final primaryVolume = _volumes.firstWhereOrNull((v) => v.isPrimary);
|
final primaryVolume = _volumes.firstWhereOrNull((v) => v.isPrimary);
|
||||||
|
@ -241,8 +241,11 @@ class _ExplorerPageState extends State<ExplorerPage> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _goTo(String path) {
|
void _goTo(String path) {
|
||||||
_directory.value = androidFileUtils.relativeDirectoryFromPath(path)!;
|
final dir = androidFileUtils.relativeDirectoryFromPath(path);
|
||||||
_updateContents();
|
if (dir != null) {
|
||||||
|
_directory.value = dir;
|
||||||
|
_updateContents();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _updateContents() {
|
void _updateContents() {
|
||||||
|
|
Loading…
Reference in a new issue