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

Fix "fileActions.currentFile" not set before using it #7624

Merged

Conversation

danxuliu
Copy link
Member

Follow-up fix for the second commit of #7591

When an empty area of a file row was clicked and the Details action was executed fileActions.currentFile was not guaranteed to be set to the appropriate object (it depended on the previous actions of the user), so when it was used by getCurrentMimeType() and other FileActions functions they may not work as expected. Now it is explicitly set to the appropriate value before its use.

When an empty area of a file row was clicked and the "Details" action
was executed "fileActions.currentFile" was not guaranteed to be set to
the appropriate object (it depended on the previous actions of the
user), so when it was used by "getCurrentMimeType()" and other
FileActions functions they may not work as expected. Now it is
explicitly set to the appropriate value before its use.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added this to the Nextcloud 13 milestone Dec 26, 2017
@codecov
Copy link

codecov bot commented Dec 26, 2017

Codecov Report

Merging #7624 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #7624      +/-   ##
============================================
+ Coverage     51.17%   51.17%   +<.01%     
  Complexity    24886    24886              
============================================
  Files          1602     1602              
  Lines         94750    94750              
  Branches       1368     1368              
============================================
+ Hits          48485    48486       +1     
+ Misses        46265    46264       -1
Impacted Files Coverage Δ Complexity Δ
apps/files_trashbin/lib/Expiration.php 91.93% <0%> (+1.61%) 29% <0%> (ø) ⬇️

@MorrisJobke MorrisJobke merged commit fa2fe34 into master Jan 2, 2018
@MorrisJobke MorrisJobke deleted the fix-fileActions-currentFile-not-set-before-using-it branch January 2, 2018 09:28
@MorrisJobke MorrisJobke mentioned this pull request Jan 2, 2018
30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants