Skip to content

FileHandler.move() places source file in destination directory instead of new file name

Created by: jayjaybillings

Calling FileHandler.move() will move the source file into a destination directory instead of moving the file to a new position. This means that

		FileHandlerFactory factory = new FileHandlerFactory();
		IFileHandler fileHandler = factory.getFileHandler();
		fileHandler.move(filePath, newFilePath);
		return;

will not result in /home/jay/testFile1.txt being moved to /home/jay/testFile2.txt. Instead, it becomes /home/jay/testFile2.txt/testFile1.txt with the destination name being used as a directory name.