Skip to content
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

Do not prevent subfolder uploads if same file exists in current direc… #3382

Closed
wants to merge 1 commit into from

Conversation

ChristophWurst
Copy link
Member

…tory

@MorrisJobke some js tests are failing, but I'm unsure if they should even pass. For example

it('shows conflict dialog when no client side conflict', function() {
var result = addFiles(uploader, [
{name: 'conflict.txt'},
{name: 'conflict2.txt'},
{name: 'noconflict.txt'}
]);
expect(conflictDialogStub.callCount).toEqual(3);
expect(conflictDialogStub.getCall(1).args[0].getFileName())
.toEqual('conflict.txt');
expect(conflictDialogStub.getCall(1).args[1])
.toEqual({ name: 'conflict.txt', mimetype: 'text/plain', directory: '/' });
expect(conflictDialogStub.getCall(1).args[2]).toEqual({ name: 'conflict.txt' });
// yes, the dialog must be called several times...
expect(conflictDialogStub.getCall(2).args[0].getFileName()).toEqual('conflict2.txt');
expect(conflictDialogStub.getCall(2).args[1])
.toEqual({ name: 'conflict2.txt', mimetype: 'text/plain', directory: '/' });
expect(conflictDialogStub.getCall(2).args[2]).toEqual({ name: 'conflict2.txt' });
expect(result[0].submit.calledOnce).toEqual(false);
expect(result[1].submit.calledOnce).toEqual(false);
expect(result[2].submit.calledOnce).toEqual(true);
});
looks fishy. Why would we show the conflict dialog if there are no conflicts? I don't get it 🙊

fixes #1218

@mention-bot
Copy link

@ChristophWurst, thanks for your PR! By analyzing the history of the files in this pull request, we identified @butonic, @luckydonald and @vincchan to be potential reviewers.

@MorrisJobke
Copy link
Member

cc @nextcloud/javascript

@luckydonald
Copy link
Contributor

This @mention-bot keeps mentioning me, even thus I have blocked him. This is kinda annoying.

@MorrisJobke
Copy link
Member

This @mention-bot keeps mentioning me, even thus I have blocked him. This is kinda annoying.

Yep - also the user blacklist is broken :/ See facebookarchive/mention-bot#178 - maybe raise your voice there too

@luckydonald
Copy link
Contributor

luckydonald commented Feb 12, 2017

So reading owncloud/core#26434, currently the blacklist file isn't working either? ☹️

@MorrisJobke
Copy link
Member

So reading owncloud/core#26434, currently the blacklist file isn't working either? ☹️

Sadly yes 😞

@ChristophWurst ChristophWurst force-pushed the fix/subfolder-upload-conflict branch from a25d019 to 892660d Compare March 13, 2017 10:48
@ChristophWurst
Copy link
Member Author

Can't wrap my head around those unit tests. Some black hackery is going on there. @nextcloud/javascript if someone likes challenges, please take a look 😉🚀

@ChristophWurst ChristophWurst added 1. to develop Accepted and waiting to be taken care of and removed 2. developing Work in progress labels Mar 13, 2017
@MorrisJobke
Copy link
Member

@danxuliu Could you help here with the tests as well? 😃

@MorrisJobke MorrisJobke force-pushed the fix/subfolder-upload-conflict branch from 892660d to 9df718d Compare October 27, 2017 12:20
@MorrisJobke
Copy link
Member

Rebased

@codecov
Copy link

codecov bot commented Oct 27, 2017

Codecov Report

Merging #3382 into master will increase coverage by 1.22%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #3382      +/-   ##
============================================
+ Coverage     52.82%   54.05%   +1.22%     
+ Complexity    22802    21052    -1750     
============================================
  Files          1442     1245     -197     
  Lines         88562    73344   -15218     
  Branches       1349        0    -1349     
============================================
- Hits          46787    39648    -7139     
+ Misses        41775    33696    -8079
Impacted Files Coverage Δ Complexity Δ
apps/files_trashbin/appinfo/app.php 0% <0%> (-100%) 0% <0%> (ø)
lib/private/Diagnostics/EventLogger.php 0% <0%> (-100%) 5% <0%> (-4%)
lib/private/Diagnostics/QueryLogger.php 0% <0%> (-100%) 6% <0%> (-3%)
apps/files_sharing/appinfo/app.php 0% <0%> (-90%) 0% <0%> (ø)
lib/private/Template/SCSSCacher.php 0% <0%> (-69.85%) 20% <0%> (-16%)
apps/files/appinfo/app.php 43.47% <0%> (-56.53%) 0% <0%> (ø)
lib/private/Diagnostics/Event.php 0% <0%> (-55.56%) 8% <0%> (ø)
core/Command/Maintenance/Mimetype/UpdateJS.php 0% <0%> (-52.64%) 13% <0%> (ø)
apps/user_ldap/templates/part.settingcontrols.php 0% <0%> (-42.86%) 0% <0%> (ø)
apps/federation/lib/AppInfo/Application.php 27.27% <0%> (-39.4%) 10% <0%> (ø)
... and 884 more

@MorrisJobke
Copy link
Member

@danxuliu If you have time to look at this: feel free to re-open it. Let's close this for now nevertheless.

@MorrisJobke MorrisJobke deleted the fix/subfolder-upload-conflict branch May 23, 2018 15:19
@MorrisJobke MorrisJobke removed this from the Nextcloud 14 milestone May 23, 2018
@PVince81 PVince81 restored the fix/subfolder-upload-conflict branch November 9, 2021 13:20
@PVince81
Copy link
Member

PVince81 commented Nov 9, 2021

raising back the dead

@PVince81 PVince81 reopened this Nov 9, 2021
@PVince81 PVince81 self-assigned this Nov 9, 2021
@PVince81
Copy link
Member

PVince81 commented Nov 9, 2021

obsoleted by #28250

@PVince81 PVince81 closed this Nov 9, 2021
@PVince81 PVince81 deleted the fix/subfolder-upload-conflict branch November 9, 2021 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug feature: files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dragging a desktop file into a folder in the browser prompts to overwrite file in root with same name
5 participants