-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separator in Window #740
Comments
This sounds like a problem in the underlying jclouds filesystem provider. I don't have access to a Windows system so this is hard for me to test. Instead could you try the new filesystem-nio2 storage backed to see if it already resolves your symptoms? |
I can try. Btw the issue is due to the fact that jclouds return a path using Windows separator (aka \ ) and this when returned causes a problem when reentering as new prefix. I did the substitution using the separatorChar to be compliant with any OS not using / as separator. I will try filesystem-nio2 |
This improves compatibility on Windows. References #740.
Please test filesystem-nio2 with the latest master or 2.5.0-SNAPSHOT from Maven. If you would like to contribute a fix to jclouds filesystem this is fine but it is better to focus on the newer filesystem-nio2 storage backend which will replace the former. |
I'm using the tool in Openshift working perfectly but when I tried to test on my Notebook some features of my application I ended up with an error on managing Folders.
Since I'm working on Windows I understood that problem is related to a wrong management of file separator.
I did a workaround at line 1518 of S3ProxyHanlder changing this code
switch (metadata.getType()) {
case FOLDER:
// fallthrough
case RELATIVE_PATH:
if (delimiter != null) {
commonPrefixes.add(metadata.getName());
continue;
}
break;
default:
break;
}
in
switch (metadata.getType()) {
case FOLDER:
// fallthrough
case RELATIVE_PATH:
if (delimiter != null) {
commonPrefixes.add(metadata.getName().replace(File.separatorChar, '/'));
continue;
}
break;
default:
break;
}
following the same code LocalBlobStore (jclouds) is doing in its filterDirectory method.
Hope you will officially fix this behavior so I will use the new version from Maven Repo...otherwise I have to keep a local copy :)
Best
The text was updated successfully, but these errors were encountered: