Fail to create new file with GridFile
-------------------------------------
Key: ISPN-1485
URL:
https://issues.jboss.org/browse/ISPN-1485
Project: Infinispan
Issue Type: Bug
Components: Core API
Affects Versions: 5.0.1.FINAL
Environment: ISPN 5.0.1 Final
Linux
Java 7
Reporter: dex chen
Assignee: Manik Surtani
The current code GridFile.java fails to create any new file with the file path containing
parent components.
For example, the following code will fail to create the new file:
...
GridFileSystem fs= new GridFileSystem(data, metadata);
File gridDir = fs.getFile("/test");
gridDir.mkdirs();
//The following fails to create the file
File gridFile = fs.getFile("/test/myfile.txt");
gridFile.createNewFile(); //this line always returns false.
....
The root cause of the above failure is that the method of "checkParentDirs(String
path, boolean create_if_absent)"
does not handle the parent dir already exists case correctly.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira