Fix folder display and add validation to file listing operations

- Handle folder names properly in getDisplayName by preserving trailing slash
- Add validation to skip invalid objects during listing
- Add default values for missing object properties (size, lastModified, etag)
- Add debug logging for listObjectsV2 operations to help troubleshoot issues
- Add null checks in deleteFolder to prevent errors with invalid objects
This commit is contained in:
2025-06-04 17:09:28 +02:00
parent 39ddebe259
commit 254cfa63a4
2 changed files with 30 additions and 11 deletions

View File

@@ -78,6 +78,12 @@ function getFileIcon(filename: string): string {
}
function getDisplayName(filepath: string): string {
// Handle folders (ending with /)
if (filepath.endsWith('/')) {
const parts = filepath.slice(0, -1).split('/');
return parts[parts.length - 1] + '/';
}
// Get just the filename from the full path
const parts = filepath.split('/');
const filename = parts[parts.length - 1];