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

SingleFileCacheStore.start() fails if cache name contains File.separator

    XMLWordPrintable

Details

    Description

      Using the old FileCacheStore, if the cache name contained File.separator, then the location of the file cache store included corresponding subdirectories.
      e.g.
      If my cache name is "myhost/mydeployment.war", then the file cache store includes a subdirectory "myhost".

      In the new SingleFileCacheStore implementation, however, start() fails because only the directories contained within the location are created. When the File object is constructed using the cache name, if the cache name contains a File.separator, those subdirectories are not created, and start() fails with the following message:
      "Directory ... does not exist and cannot be created!"

      As I see it, this can be fixed in 1 of 2 ways:
      1. Escape any file separators in the cache name when constructing the file name
      2. Create the necessary subdirectories on the File object created using the cache name

      Attachments

        Issue Links

          Activity

            People

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: