Skip to content
Snippets Groups Projects
Commit f6dba7e6 authored by ewrh1g20's avatar ewrh1g20
Browse files

synchronised removed operation

parent 3f4cd2c0
Branches
No related tags found
No related merge requests found
......@@ -615,6 +615,7 @@ public class Controller {
System.out.println("Remove operation started for file: " + filename);
boolean exists = false;
synchronized (clientLock) {
for (Index i : index) {
if (i.getFilename().equals(filename)) {
exists = true;
......@@ -627,6 +628,7 @@ public class Controller {
}
}
}
}
if (!exists) {
messageOutput.println("ERROR_FILE_DOES_NOT_EXIST");
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment