|
@@ -273,12 +273,18 @@ public class AliyunOSSFileSystem extends FileSystem {
|
|
}
|
|
}
|
|
if (meta == null) {
|
|
if (meta == null) {
|
|
ObjectListing listing = store.listObjects(key, 1, null, false);
|
|
ObjectListing listing = store.listObjects(key, 1, null, false);
|
|
- if (CollectionUtils.isNotEmpty(listing.getObjectSummaries()) ||
|
|
|
|
- CollectionUtils.isNotEmpty(listing.getCommonPrefixes())) {
|
|
|
|
- return new OSSFileStatus(0, true, 1, 0, 0, qualifiedPath, username);
|
|
|
|
- } else {
|
|
|
|
- throw new FileNotFoundException(path + ": No such file or directory!");
|
|
|
|
- }
|
|
|
|
|
|
+ do {
|
|
|
|
+ if (CollectionUtils.isNotEmpty(listing.getObjectSummaries()) ||
|
|
|
|
+ CollectionUtils.isNotEmpty(listing.getCommonPrefixes())) {
|
|
|
|
+ return new OSSFileStatus(0, true, 1, 0, 0, qualifiedPath, username);
|
|
|
|
+ } else if (listing.isTruncated()) {
|
|
|
|
+ listing = store.listObjects(key, 1000, listing.getNextMarker(),
|
|
|
|
+ false);
|
|
|
|
+ } else {
|
|
|
|
+ throw new FileNotFoundException(
|
|
|
|
+ path + ": No such file or directory!");
|
|
|
|
+ }
|
|
|
|
+ } while (true);
|
|
} else if (objectRepresentsDirectory(key, meta.getContentLength())) {
|
|
} else if (objectRepresentsDirectory(key, meta.getContentLength())) {
|
|
return new OSSFileStatus(0, true, 1, 0, meta.getLastModified().getTime(),
|
|
return new OSSFileStatus(0, true, 1, 0, meta.getLastModified().getTime(),
|
|
qualifiedPath, username);
|
|
qualifiedPath, username);
|