mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge branch 'master' into backgroundjob-public
This commit is contained in:
commit
60bd9d512d
6 changed files with 37 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ class Scan extends Command {
|
|||
|
||||
protected function execute(InputInterface $input, OutputInterface $output) {
|
||||
if ($input->getOption('all')) {
|
||||
\OC_App::loadApps('authentication');
|
||||
$users = $this->userManager->search('');
|
||||
} else {
|
||||
$users = $input->getArgument('user_id');
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class OC_Files {
|
|||
}
|
||||
if ($xsendfile) {
|
||||
list($storage) = \OC\Files\Filesystem::resolvePath(\OC\Files\Filesystem::getView()->getAbsolutePath($filename));
|
||||
if ($storage instanceof \OC\Files\Storage\Local) {
|
||||
if ($storage->isLocal()) {
|
||||
self::addSendfileHeader(\OC\Files\Filesystem::getLocalFile($filename));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -370,4 +370,13 @@ abstract class Common implements \OC\Files\Storage\Storage {
|
|||
public function free_space($path) {
|
||||
return \OC\Files\SPACE_UNKNOWN;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isLocal() {
|
||||
// the common implementation returns a temporary file by
|
||||
// default, which is not local
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -298,5 +298,12 @@ if (\OC_Util::runningOnWindows()) {
|
|||
public function hasUpdated($path, $time) {
|
||||
return $this->filemtime($path) > $time;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isLocal() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -432,4 +432,12 @@ class Wrapper implements \OC\Files\Storage\Storage {
|
|||
public function test() {
|
||||
return $this->storage->test();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the wrapped storage's value for isLocal()
|
||||
* @return bool wrapped storage's isLocal() value
|
||||
*/
|
||||
public function isLocal() {
|
||||
return $this->storage->isLocal();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -315,4 +315,15 @@ interface Storage {
|
|||
* @return string
|
||||
*/
|
||||
public function getETag($path);
|
||||
|
||||
/**
|
||||
* Returns whether the storage is local, which means that files
|
||||
* are stored on the local filesystem instead of remotely.
|
||||
* Calling getLocalFile() for local storages should always
|
||||
* return the local files, whereas for non-local storages
|
||||
* it might return a temporary file.
|
||||
*
|
||||
* @return bool true if the files are stored locally, false otherwise
|
||||
*/
|
||||
public function isLocal();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue