Silently skips errors on file upload
This commit is contained in:
parent
1c051bab6f
commit
7becd2f8d9
|
@ -52,7 +52,7 @@ public class UploadFilesCall implements Callable<ZenodoDeposition>{
|
|||
log.debug("Remote file "+f+" is not in requested set. Deleting it..");
|
||||
z.deleteFile(dep, f);
|
||||
}catch(Throwable t) {
|
||||
throw new Exception("Unable to delete "+f,t);
|
||||
log.warn("Unable to delete "+f,t);
|
||||
}
|
||||
else {
|
||||
// File present, checking for update
|
||||
|
@ -66,7 +66,7 @@ public class UploadFilesCall implements Callable<ZenodoDeposition>{
|
|||
z.uploadFile(dep, found.getName(), downloaded.getF());
|
||||
}
|
||||
}catch(Throwable t) {
|
||||
throw new Exception("Unable to update "+f,t);
|
||||
log.warn("Unable to update "+f,t);
|
||||
}finally {
|
||||
if(downloaded!=null) Files.deleteIfExists(downloaded.getF().toPath());
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public class UploadFilesCall implements Callable<ZenodoDeposition>{
|
|||
z.uploadFile(dep, r.getName(),downloaded.getF());
|
||||
}
|
||||
}catch(Throwable t) {
|
||||
throw new Exception("Unable to upload "+r.getName()+".",t);
|
||||
log.warn("Unable to upload "+r.getName()+".",t);
|
||||
}
|
||||
}
|
||||
return z.readDeposition(dep.getId());
|
||||
|
|
Loading…
Reference in New Issue