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

Use FileUtils instead of function in Scanner #32375

Merged
merged 1 commit into from
Sep 27, 2018
Merged

Use FileUtils instead of function in Scanner #32375

merged 1 commit into from
Sep 27, 2018

Conversation

mrow4a
Copy link
Contributor

@mrow4a mrow4a commented Aug 19, 2018

As in the topic - addressing technical dept

@@ -69,13 +77,7 @@ public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $loc
* @param string $file
* @return boolean
* @since 9.0.0
* @deprecated use FileUtils
*/
public static function isPartialFile($file);
Copy link
Contributor Author

@mrow4a mrow4a Aug 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont even think if anybody is using this interface.. why would it? It was circumvented anyways in View and used Cache/Scanner directly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete it?

@codecov
Copy link

codecov bot commented Aug 19, 2018

Codecov Report

Merging #32375 into master will decrease coverage by <.01%.
The diff coverage is 85%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #32375      +/-   ##
============================================
- Coverage     64.03%   64.03%   -0.01%     
+ Complexity    18579    18578       -1     
============================================
  Files          1171     1172       +1     
  Lines         69876    69874       -2     
  Branches       1267     1267              
============================================
- Hits          44747    44743       -4     
- Misses        24759    24761       +2     
  Partials        370      370
Flag Coverage Δ Complexity Δ
#javascript 52.84% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.31% <85%> (-0.01%) 18578 <4> (-1)
Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Storage/Wrapper/Checksum.php 100% <100%> (ø) 23 <0> (-2) ⬇️
lib/private/Files/View.php 84.47% <100%> (ø) 396 <0> (ø) ⬇️
lib/private/Files/Utils/FileUtils.php 100% <100%> (ø) 3 <3> (?)
lib/private/Files/Cache/Scanner.php 85.36% <33.33%> (-1.24%) 112 <1> (-2)
lib/private/Files/Cache/Updater.php 88.09% <75%> (ø) 35 <0> (ø) ⬇️

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 9a4c4ea...1a34d83. Read the comment docs.

@@ -69,13 +76,7 @@ public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $loc
* @param string $file
* @return boolean
* @since 9.0.0
* @deprecated use FileUtils
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FileUtils is OC namespace - it cannot be used to deprecate an OCP method.

keep it here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DeepDiver1975 can we remove it at all? I don't think anybody uses this interface, since why would he?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can deprecate it and we can remove the api call in some month/years

@@ -0,0 +1,41 @@
<?php
/**
* Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong copytight - please adjust

*
* @package Test\Files\Utils
*/
class FileUtilsSTest extends \Test\TestCase {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-S

*
* @package Test\Files\Utils
*/
class FileUtilsSTest extends \Test\TestCase {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import TestCase

@mrow4a mrow4a force-pushed the partial_file branch 2 times, most recently from d9402c9 to 1a34d83 Compare August 21, 2018 07:02
@mrow4a
Copy link
Contributor Author

mrow4a commented Aug 21, 2018

@DeepDiver1975 all tests passing, review addressed

@DeepDiver1975
Copy link
Member

conflicting ... please resolve

@mrow4a
Copy link
Contributor Author

mrow4a commented Sep 18, 2018

@DeepDiver1975 rebased

if (\pathinfo($path, PATHINFO_EXTENSION) === 'part') {
return true;
}
if (\strpos($path, '.part/') !== false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in some cases you replaced this part was missing, I wonder if this will break some undiscovered cases with "part folders"

let's keep this PR master only just in case

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81 PVince81 merged commit 9d9a557 into master Sep 27, 2018
@PVince81 PVince81 deleted the partial_file branch September 27, 2018 12:47
@PVince81
Copy link
Contributor

master only, see #32375 (comment)

@phil-davis
Copy link
Contributor

Is #32375 (comment) still correct?
A breaking change, or is backport possible?
@PVince81 @DeepDiver1975

@PVince81
Copy link
Contributor

PVince81 commented Apr 1, 2019

let's play it safe => no backport.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants