[full-ci] Allow renaming two files with the same name but different paths#39315
[full-ci] Allow renaming two files with the same name but different paths#39315phil-davis merged 4 commits intomasterfrom
Conversation
77b419a to
168b51a
Compare
|
@phil-davis should we add acceptance tests for #20722 ? |
3cb0726 to
4f5a500
Compare
|
💥 Acceptance tests pipeline webUISharingPublic2-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
|
💥 Acceptance tests pipeline webUISharingPublic2-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
|
Note: there is another scenario, which is a different existing feature:
It would be nice if the on-the-fly rename code in the JavaScript could "understand" that the proposed name is already used. But that would require more real-time code that checks with the server on every character as it is typed, or when starting the "Rename" input, the JavaScript would have to get a list of all the files in the foldder of that item, so that it could check as the user types. Maybe not feasible. |
1e31047 to
8637687
Compare
|
Rebased to get fresh CI. |
|
💥 Acceptance tests pipeline webUISharingPublic2-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
|
@janackermann I sorted out the There is the same problem on the "Shared with others" page. If you can sort out the hover-text being updated (data-original-title) on rename, then the test scenario should pass. The "Favorites" page does not seem to have any hover-text to give the user a clue where the resource really is. When I have 2 files with the same name on the Favorites page, I don't know how I can know which file is from which folder. If we can have some similar way for the user to know which resource is from where, then we can make test scenarios. |
|
@phil-davis Thx, will take care |
3d44230 to
c86e410
Compare
this has been introduced just know, do you want to adjust the tests? |
tests/acceptance/features/lib/FilesPageElement/SharedByLinkFileRow.php
Outdated
Show resolved
Hide resolved
tests/acceptance/features/webUISharingPublic2/shareByPublicLink.feature
Outdated
Show resolved
Hide resolved
|
I will come banck when CI is done, and look what happens and then see what other tests can be added. |
|
@phil-davis friendly ping =) |
phil-davis
left a comment
There was a problem hiding this comment.
LGTM. I tried various renaming to matching and not matching names on the Favorites page and the Shared by Link page and it works fine. Tests pass.
I found one little thing in the changelog!
Co-authored-by: Phil Davis <phil@jankaritech.com>
phil-davis
left a comment
There was a problem hiding this comment.
LGTM now - works.
@jvillafanez please review again
|
https://drone.owncloud.com/owncloud/core/32907/31/8 That is a strange unit test fail - nothing to do with this PR. I will restart CI. |
|
Kudos, SonarCloud Quality Gate passed! |









Description
Bugfix: Allow renaming two files with the same name but different paths
With this change, we allow renaming a file to an existing file name,
when the path differs.
This happens for example when the user creates the file
'/mydirname/text.txt' and '/mytext.txt' then mark both as favorite.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: