-
Notifications
You must be signed in to change notification settings - Fork 106
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
Bug Fixes #220
base: master
Are you sure you want to change the base?
Bug Fixes #220
Conversation
Can you describe under which circumstances these issues occur? While this may be unexpected and quite inconvenient, jcifs has always required that URLs to directories are specified with a trailing slash by the user. |
Sure! The problem occurs when I try do delete a directory recursively: suppose you have the following directories: When you try to delete smb://host/share/nonEmptyDir/, jcifs returns the following error message: Invalid operation for workgroups, servers or share. This error occurs no matter if there is a trailing slash when getting the file for nonEmptyDir/ |
By the way, I've noticed that the modification done in SmbResourceLocatorImpl fixed the problem related with recursive directory deletion (my unit tests break without it, and works fine with that fix). In the other hand, the modification done in the Smb Url Handler fixes an issue when listing files: After calling SmbFile("smb://host/share/someDir", context).listFiles(), it will return a vector containing one single file with the following path: smb://host/share/test1.txt (the expected path is smb://host/share/someDir/test1.txt"). After applying the fix to the Handler class, the SmbFile.listFiles() method works as expected. |
Please watch your tone. Note, that as I mentioned at least some of the described issue appears to be actually "documented" behavior (even though this is admittetly stupid). Changing that however I believe has some other implications which need further investigation, making this more complex than just merging the patch. But, I have to admit I lost track of it, at least the recursive deletion issue sounds like a legtimate one. I'll try to look into it some time soon. |
I'm sorry for the double question marks, it was only to express my utter surprise for such a bug not being fixed yet, no offence meant really.. I understand and appreciate the hard work you do for the project, thank you! I got your point about backward compatibility. Maybe introduce a way of selecting the behaviour, keeping the old one as a legacy. |
URL Handler: parseUrl was not parsing URLs correctly when deleting
files recursively
Resource Locator Implementation: paths and names were concatenated
without path separator in method resolveInContext