public void updateFileLinksOnWindows() {
		if (currentFiles == null) {
			currentFiles = getFiles();
		}

		toUpdate.clear();

		List<ServerFile> toDelete = new ArrayList<>();
		for (ServerFile file : currentFiles) {
			if (file.getFlag() == ServerFile.DELETED) {
				file.tryDelete(getController().getConfig().getProperty(
						"mount.testdir")
						+ "/categories/");
				toDelete.add(file);
			}
		}
		this.getController().getDb().delete(toDelete);

		for (ServerFile serverfile : currentFiles) {
			if (serverfile.getFlag() != ServerFile.CREATED
					&& serverfile.getFlag() != ServerFile.UPDATED) {
				continue;
			}
			File file = new File(getController().getConfig().getProperty(
					"mount.testdir")
					+ "/categories/" + serverfile.getPath());
			file.getParentFile().mkdirs();
			try {
				Files.write(file.toPath(), serverfile.getServerpath()
						.getBytes(), StandardOpenOption.CREATE,
						StandardOpenOption.WRITE,
						StandardOpenOption.TRUNCATE_EXISTING);
			} catch (IOException e) {
				e.printStackTrace();
			}
			// Prevent history spam after reconnects.
			if(!isJustReconnected()) {
				getController().track(serverfile);
			}
			serverfile.setFlag(ServerFile.UP_TO_DATE);
			serverfile.setModified();
			toUpdate.add(serverfile);
		}
		this.saveChanges();
	}