D13676: Make it possible to change directory up even with trailing slashes in the url
This revision was automatically updated to reflect the committed changes. Closed by commit R241:6ab78df8c86e: Make it possible to change directory up even with trailing slashes in the url (authored by jtamate). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D13676?vs=37500&id=41906 REVISION DETAIL https://phabricator.kde.org/D13676 AFFECTED FILES autotests/kdiroperatortest.cpp autotests/kurifiltertest.cpp src/filewidgets/kdiroperator.cpp src/widgets/kurifilter.cpp To: jtamate, dfaure, #frameworks Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D13676: Make it possible to change directory up even with trailing slashes in the url
dfaure accepted this revision. This revision is now accepted and ready to land. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D13676 To: jtamate, dfaure, #frameworks Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D13676: Make it possible to change directory up even with trailing slashes in the url
jtamate updated this revision to Diff 37500. jtamate edited the summary of this revision. jtamate edited the test plan for this revision. jtamate added a comment. The url in the lineedit is get from KUriFilterData, and it didn't normalize the paths, allowing trailing slashes. Include 4 new tests and fix 2 (the ones with // in the middle of the urls). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D13676?vs=36513&id=37500 REVISION DETAIL https://phabricator.kde.org/D13676 AFFECTED FILES autotests/kdiroperatortest.cpp autotests/kurifiltertest.cpp src/filewidgets/kdiroperator.cpp src/widgets/kurifilter.cpp To: jtamate, dfaure, #frameworks Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D13676: Make it possible to change directory up even with trailing slashes in the url
dfaure added a comment. Unittests would help ;) REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D13676 To: jtamate, dfaure, #frameworks Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D13676: Make it possible to change directory up even with trailing slashes in the url
jtamate updated this revision to Diff 36513. jtamate added a comment. Using NormalizePathSegments. There is something else going on with the trailing slashes in the file dialog. If I'm in my home directory and I append slashes, they are removed, also in /, but in /home/ and other directories they are not removed, and every time I end up in /home/ the text in the url is /home/// (not in the breadcrumb). REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D13676?vs=36509&id=36513 REVISION DETAIL https://phabricator.kde.org/D13676 AFFECTED FILES src/filewidgets/kdiroperator.cpp To: jtamate, dfaure, #frameworks Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D13676: Make it possible to change directory up even with trailing slashes in the url
dfaure requested changes to this revision. dfaure added a comment. This revision now requires changes to proceed. I think you want QUrl::NormalizePathSegments, which would make this code simpler (and would also handle a initial URL like /d/c/../ if it can make it to that code path) REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D13676 To: jtamate, dfaure, #frameworks Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D13676: Make it possible to change directory up even with trailing slashes in the url
jtamate created this revision. jtamate added reviewers: dfaure, Frameworks. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: kde-frameworks-devel. jtamate requested review of this revision. REVISION SUMMARY Leave only the last / in the url before going up. TEST PLAN The url of a ntfs partition is file:///d//. When I pressed cdUp, it remained in the same directory instead of going to root. Now even if I write urls like /d/c///, when I press cdUp it goes up to /d/. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D13676 AFFECTED FILES src/filewidgets/kdiroperator.cpp To: jtamate, dfaure, #frameworks Cc: kde-frameworks-devel, michaelh, ngraham, bruns