Project

General

Profile

« Previous | Next » 

Revision 46752

Fixed file path

View differences:

modules/dnet-data-services/branches/saxonHE/src/main/java/eu/dnetlib/data/collector/plugins/sftp/SftpIterator.java
191 191
								Instant instant = Instant.ofEpochMilli(mTime * 1000L);
192 192
								LocalDateTime dt = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
193 193
								if (dt.isAfter(fromDate)) {
194
									queue.add(currentFileName);
195
									log.debug(currentFileName + " has changed and must be re-collected");
194
									queue.add(currentDir+"/"+currentFileName);
195
									log.debug(dirToList+"/"+currentFileName + " has changed and must be re-collected");
196 196
								} else {
197 197
									if (log.isDebugEnabled()) {
198
										log.debug(currentFileName + " has not changed since last collection");
198
										log.debug(dirToList+"/"+currentFileName + " has not changed since last collection");
199 199
									}
200 200
								}
201 201
							} else {
202 202
								//if it is not incremental, just add it to the queue
203
								queue.add(currentFileName);
203
								queue.add(dirToList+"/"+currentFileName);
204 204
							}
205 205

  
206 206
						}
......
232 232
			try {
233 233
				OutputStream baos = new ByteArrayOutputStream();
234 234
				sftpChannel.get(nextRemotePath, baos);
235
				fullPathFile = sftpChannel.pwd() + "/" + nextRemotePath;
235 236
				if (log.isDebugEnabled()) {
236
					fullPathFile = sftpChannel.pwd() + "/" + nextRemotePath;
237 237
					log.debug(String.format("Collected file from SFTP: %s%s", sftpServerAddress, fullPathFile));
238 238
				}
239 239
				return baos.toString();

Also available in: Unified diff