Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1485

Fail to create new file with GridFile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.1.0.BETA5, 5.1.0.FINAL
    • 5.0.1.FINAL
    • Core
    • None
    • Hide

      start GridFileSystem simple app as in the QuickStart
      make dir such as fs.mkdirs("/tmp")
      create a new grid file with file path "/tmp/test"
      check to see if the file is created successfully or not

      The result is that the create new file failed.

      Show
      start GridFileSystem simple app as in the QuickStart make dir such as fs.mkdirs("/tmp") create a new grid file with file path "/tmp/test" check to see if the file is created successfully or not The result is that the create new file failed.
    • Low

      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.

              manik_jira Manik Surtani (Inactive)
              dex80526_jira dex chen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: