Disabled out of date fix for files, and disabled file download in staging

This commit is contained in:
2024-03-24 01:57:25 +01:00
parent 1374666858
commit 5134f50523
2 changed files with 13 additions and 7 deletions

View File

@ -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 == "/");