Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
shwas1 committed Aug 22, 2021
1 parent 044ec20 commit da567fd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ public String[] getChildrenNames(ITransaction transaction, String folderUri) {

@Override
public long getResourceLength(ITransaction transaction, String path) {
return getResourceLength2(transaction, path);
}

public long getResourceLength2(ITransaction transaction, String path) {
LOGGER.info("getResourceLength: {}", path);
TFile tFile = aliYunDriverClientService.getTFileByPath(path);
if (tFile == null || tFile.getSize() == null) {
Expand Down Expand Up @@ -187,7 +191,7 @@ public StoredObject getStoredObject(ITransaction transaction, String uri) {
if (tFile != null) {
StoredObject so = new StoredObject();
so.setFolder(tFile.getType().equalsIgnoreCase("folder"));
so.setResourceLength(getResourceLength(transaction, uri));
so.setResourceLength(getResourceLength2(transaction, uri));
so.setCreationDate(tFile.getCreated_at());
so.setLastModified(tFile.getUpdated_at());
return so;
Expand Down

0 comments on commit da567fd

Please sign in to comment.