X Tutup
Skip to content

[stable10] Backport of Fix path option in the verify checksum cmd#35694

Merged
sharidas merged 1 commit intostable10from
fix-path-verify-checksum-stable10
Jul 1, 2019
Merged

[stable10] Backport of Fix path option in the verify checksum cmd#35694
sharidas merged 1 commit intostable10from
fix-path-verify-checksum-stable10

Conversation

@sharidas
Copy link
Contributor

The path option in the verify checksum command
should now be relative to the user folder.

Signed-off-by: Sujith H sharidasan@owncloud.com

Description

The verify checksum command was failing to fix the checksum when path option is provided as:

  • $user/files/foo or /$user/files/foo/bar

The reason for this is get() in the https://github.com/owncloud/core/blob/master/lib/private/Files/Node/Root.php#L180 will add extra entry in the cache. This PR tries to resolve the issue by accepting path which is relative to users folder, instead of datadirectory.

Related Issue

  • Fixes <issue_link>

Motivation and Context

This PR solves the addition of the file path to the filecache table, when -p option is used with the command.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@sharidas sharidas requested a review from jvillafanez June 28, 2019 10:01
@sharidas sharidas self-assigned this Jun 28, 2019
@sharidas sharidas added this to the development milestone Jun 28, 2019
@jvillafanez
Copy link
Member

Code looks fine, but CI seems to be in a rebelious phase...

@phil-davis
Copy link
Contributor

There are multiple CI issues at present. PRs #35693 (master) and #35696 (stable10) should get it green again. I will ping when those are merged and people can rebase.

The path option in the verify checksum command
should now be relative to the user folder.

Signed-off-by: Sujith H <sharidasan@owncloud.com>
@sharidas sharidas force-pushed the fix-path-verify-checksum-stable10 branch from 684d3b6 to 2f7d772 Compare July 1, 2019 08:33
@codecov
Copy link

codecov bot commented Jul 1, 2019

Codecov Report

Merging #35694 into stable10 will decrease coverage by <.01%.
The diff coverage is 78.94%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #35694      +/-   ##
==============================================
- Coverage       64.86%   64.85%   -0.01%     
+ Complexity      20225    20220       -5     
==============================================
  Files            1294     1294              
  Lines           77279    77280       +1     
  Branches         1301     1301              
==============================================
- Hits            50126    50123       -3     
- Misses          26768    26772       +4     
  Partials          385      385
Flag Coverage Δ Complexity Δ
#javascript 53.85% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.02% <78.94%> (-0.01%) 20220 <0> (-5)
Impacted Files Coverage Δ Complexity Δ
apps/files/lib/Command/VerifyChecksums.php 91.76% <78.94%> (-4.67%) 32 <0> (-5)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0084cb...2f7d772. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jul 1, 2019

Codecov Report

Merging #35694 into stable10 will decrease coverage by <.01%.
The diff coverage is 78.94%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #35694      +/-   ##
==============================================
- Coverage       64.86%   64.85%   -0.01%     
+ Complexity      20225    20220       -5     
==============================================
  Files            1294     1294              
  Lines           77279    77280       +1     
  Branches         1301     1301              
==============================================
- Hits            50126    50123       -3     
- Misses          26768    26772       +4     
  Partials          385      385
Flag Coverage Δ Complexity Δ
#javascript 53.85% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.02% <78.94%> (-0.01%) 20220 <0> (-5)
Impacted Files Coverage Δ Complexity Δ
apps/files/lib/Command/VerifyChecksums.php 91.76% <78.94%> (-4.67%) 32 <0> (-5)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0084cb...2f7d772. Read the comment docs.

@sharidas
Copy link
Contributor Author

sharidas commented Jul 1, 2019

Original PR: #35483

@sharidas sharidas merged commit 3fafebe into stable10 Jul 1, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-path-verify-checksum-stable10 branch July 1, 2019 11:16
@davitol davitol mentioned this pull request Sep 3, 2019
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup