From 3d515106fc09b5370bfd5a01619f48e9f43b4492 Mon Sep 17 00:00:00 2001 From: flavien Date: Sun, 29 Mar 2020 15:02:57 +0200 Subject: [PATCH] added cli info and journalization --- src/clientP2P/ClientManagement.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/clientP2P/ClientManagement.java b/src/clientP2P/ClientManagement.java index b139f55..a9e7564 100644 --- a/src/clientP2P/ClientManagement.java +++ b/src/clientP2P/ClientManagement.java @@ -236,16 +236,16 @@ public abstract class ClientManagement extends ServeErrors implements Runnable { else{ int j = Integer.parseInt(f); if(j <= list.length){ - j = j-1; + j--; download(list[j]); + System.out.println("File " + f + " sucessfully downloaded"); + writeLog("File " + f + " sucessfully downloaded", LogLevel.Info); } else{ - System.out.println("Wrong number"); + System.out.println("File " + f + " unsucessfully downloaded, wrong number"); + writeLog("File " + f + " unsucessfully downloaded, wrong number", LogLevel.Info); } } - //download(f); - System.out.println("File " + f + " sucessfully downloaded"); - writeLog("File " + f + " sucessfully downloaded", LogLevel.Info); } catch (EmptyDirectory e) { writeLog("Server has no file in directory", LogLevel.Error); } catch (InternalError e) {