@@ -91,21 +91,16 @@ public PathAttributes find(final Path file, final ListProgressListener listener)
9191 }
9292 }
9393 else {
94-
9594 final String id = fileid .getVersionId (file );
95+ B2FileResponse response ;
9696 try {
97- return this .findFileInfo (file , id );
97+ response = this .findFileInfo (file , id );
9898 }
9999 catch (NotfoundException e ) {
100100 // Try with reset cache after failure finding node id
101- return this .findFileInfo (file , fileid .getVersionId (file ));
101+ response = this .findFileInfo (file , fileid .getVersionId (file ));
102102 }
103- }
104- }
105-
106- private PathAttributes findFileInfo (final Path file , final String id ) throws BackgroundException {
107- try {
108- final PathAttributes attr = this .toAttributes (session .getClient ().getFileInfo (id ));
103+ final PathAttributes attr = this .toAttributes (response );
109104 if (attr .isDuplicate ()) {
110105 // Throw failure if latest version has hide marker set and lookup was without explicit version
111106 if (StringUtils .isBlank (file .attributes ().getVersionId ())) {
@@ -117,6 +112,12 @@ private PathAttributes findFileInfo(final Path file, final String id) throws Bac
117112 }
118113 return attr ;
119114 }
115+ }
116+
117+ private B2FileResponse findFileInfo (final Path file , final String id ) throws BackgroundException {
118+ try {
119+ return session .getClient ().getFileInfo (id );
120+ }
120121 catch (B2ApiException e ) {
121122 throw new B2ExceptionMappingService (fileid ).map ("Failure to read attributes of {0}" , e , file );
122123 }
0 commit comments