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

allow shallow (non-recursive) scan when scanning file storage #9526

Merged
merged 2 commits into from
Jun 25, 2018
Merged

allow shallow (non-recursive) scan when scanning file storage #9526

merged 2 commits into from
Jun 25, 2018

Conversation

Blaok
Copy link
Contributor

@Blaok Blaok commented May 18, 2018

When user files are deleted externally on the filesystem, current version of occ files:scan recursively scans the whole folder, which is not necessary. This patch adds a new argument, i.e., occ files:scan --shallow, to allow shallow scan on a certain folder.

Blaok added 2 commits May 18, 2018 14:50
Signed-off-by: Yuze Chi <i@blaok.me>
Signed-off-by: Yuze Chi <i@blaok.me>
@codecov
Copy link

codecov bot commented May 19, 2018

Codecov Report

Merging #9526 into master will increase coverage by <.01%.
The diff coverage is 70%.

@@             Coverage Diff             @@
##             master   #9526      +/-   ##
===========================================
+ Coverage      51.7%   51.7%   +<.01%     
  Complexity    25744   25744              
===========================================
  Files          1643    1643              
  Lines         96506   96511       +5     
  Branches       1393    1393              
===========================================
+ Hits          49894   49897       +3     
- Misses        46612   46614       +2
Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Utils/Scanner.php 77.11% <100%> (ø) 40 <16> (ø) ⬇️
apps/files/lib/Command/Scan.php 22.04% <62.5%> (+2.15%) 51 <11> (ø) ⬇️
apps/files_trashbin/lib/Expiration.php 90.32% <0%> (-1.62%) 29% <0%> (ø)
apps/files_trashbin/lib/Trashbin.php 72.46% <0%> (-0.25%) 136% <0%> (ø)

@skjnldsv skjnldsv requested review from rullzer, MorrisJobke, icewind1991, blizzz and silvaarapi and removed request for silvaarapi May 26, 2018 10:10
@skjnldsv skjnldsv added this to the Nextcloud 14 milestone May 26, 2018
@MorrisJobke MorrisJobke added the stale Ticket or PR with no recent activity label Jun 19, 2018
@pann
Copy link

pann commented Jun 25, 2018

We are using Nextcloud together with a backup system, but we do not want to generate meta-data for the backup folders as they can be very large and the scan takes very long time.
This patch is implementing just what I need, anything that I can do to help the process?

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Jun 25, 2018
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Code makes sense 👍 Works here

@MorrisJobke
Copy link
Member

@icewind1991 @rullzer Could you have a look?

@icewind1991 icewind1991 merged commit 587d7cc into nextcloud:master Jun 25, 2018
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.

6 participants