fix listContents() for subdirectories if parent is uppercase#2
fix listContents() for subdirectories if parent is uppercase#2Schlaefer wants to merge 1 commit intothephpleague:masterfrom
Conversation
|
@basz I think this is related. Shouldn't the entire path be lowercased? What reason is there to only lowercase everything from the first parent directory? |
|
I don't have my 'finger behind it' completely yet. I am having troubles with a unix and osx environment which handles cases differently. But I think that the mapper callback in https://github.com/thephpleague/flysystem/blob/master/src/Filesystem.php#L355 should be aware of the case sensitivity of the adapter. I have an dropbox app in which I get mixed results for a prefixed path and a path without the prefix set. Confusing... |
|
From what I've seen so far the last part of the path (basename) is always case sensitive. Everything else esp. on longer paths gets lowercased. So when querying down the path tree preserving the then basename part in every step should hopefully result in a complete case preserved path.
👍 |
|
I'm having the same problem at spatie/flysystem-dropbox too. If somebody knows a good solution for this problem, I'd highly appreciate a clean well-tested fix for this problem. |
davemin
left a comment
There was a problem hiding this comment.
Not always ok,not working on last ver.
Let's say we have file
Foo/bar/baz.txton dropbox. Thenreturns an empty array.
The problem is that the dropbox API returns the
pathas lowercase:foo/bar.League\Flysystem::listContents()then filters the content out because it compares 'Foo/bar' to 'foo/bar'.