Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
d4a8d5d2
Commit
d4a8d5d2
authored
9 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #22998 from owncloud/delay-loading-the-scanner
Delay check till scanner is used
parents
0f6ea9fd
80b91264
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files_sharing/lib/external/scanner.php
+4
-1
4 additions, 1 deletion
apps/files_sharing/lib/external/scanner.php
apps/files_sharing/lib/external/storage.php
+1
-4
1 addition, 4 deletions
apps/files_sharing/lib/external/storage.php
with
5 additions
and
5 deletions
apps/files_sharing/lib/external/scanner.php
+
4
−
1
View file @
d4a8d5d2
...
...
@@ -36,6 +36,10 @@ class Scanner extends \OC\Files\Cache\Scanner {
/** {@inheritDoc} */
public
function
scan
(
$path
,
$recursive
=
self
::
SCAN_RECURSIVE
,
$reuse
=
-
1
,
$lock
=
true
)
{
if
(
!
$this
->
storage
->
remoteIsOwnCloud
())
{
return
parent
::
scan
(
$path
,
$recursive
,
$recursive
,
$lock
);
}
$this
->
scanAll
();
}
...
...
@@ -90,7 +94,6 @@ class Scanner extends \OC\Files\Cache\Scanner {
}
if
(
$data
[
'status'
]
===
'success'
)
{
$this
->
addResult
(
$data
[
'data'
],
''
);
}
elseif
(
$data
[
'status'
]
===
'unsupported'
)
{
}
else
{
throw
new
\Exception
(
'Error while scanning remote share: "'
.
...
...
This diff is collapsed.
Click to expand it.
apps/files_sharing/lib/external/storage.php
+
1
−
4
View file @
d4a8d5d2
...
...
@@ -136,9 +136,6 @@ class Storage extends DAV implements ISharedStorage {
if
(
!
$storage
)
{
$storage
=
$this
;
}
if
(
!
$this
->
remoteIsOwnCloud
())
{
return
parent
::
getScanner
(
$path
,
$storage
);
}
if
(
!
isset
(
$this
->
scanner
))
{
$this
->
scanner
=
new
Scanner
(
$storage
);
}
...
...
@@ -266,7 +263,7 @@ class Storage extends DAV implements ISharedStorage {
*
* @return bool
*/
p
rivate
function
remoteIsOwnCloud
()
{
p
ublic
function
remoteIsOwnCloud
()
{
if
(
defined
(
'PHPUNIT_RUN'
)
||
!
$this
->
testRemoteUrl
(
$this
->
getRemote
()
.
'/status.php'
))
{
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment