Disabled out of date fix for files, and disabled file download in staging
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
|
||||
import 'package:nextcloud/nextcloud.dart';
|
||||
|
||||
import '../../../../../model/endpointData.dart';
|
||||
import '../../webdavApi.dart';
|
||||
import 'cacheableFile.dart';
|
||||
import 'listFilesParams.dart';
|
||||
@ -18,12 +17,13 @@ class ListFiles extends WebdavApi<ListFilesParams> {
|
||||
Set<CacheableFile> files = davFiles.map((e) => CacheableFile.fromDavFile(e)).toSet();
|
||||
|
||||
// webdav handles subdirectories wrong, this is a fix
|
||||
if(EndpointData().getEndpointMode() == EndpointMode.stage) {
|
||||
files = files.map((e) { // somehow
|
||||
e.path = e.path.split("mobile/cloud/remote.php/webdav")[1];
|
||||
return e;
|
||||
}).toSet();
|
||||
}
|
||||
// currently this fix is not needed anymore
|
||||
// if(EndpointData().getEndpointMode() == EndpointMode.stage) {
|
||||
// files = files.map((e) { // somehow
|
||||
// e.path = e.path.split("mobile/cloud/remote.php/webdav")[1];
|
||||
// return e;
|
||||
// }).toSet();
|
||||
// }
|
||||
|
||||
// somehow the current working folder is also listed, it is filtered here.
|
||||
files.removeWhere((element) => element.path == "/${params.path}/" || element.path == "/");
|
||||
|
Reference in New Issue
Block a user