mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
add OCP\Files to access files
This commit is contained in:
parent
9be6432aac
commit
bf09bcc854
1 changed files with 3 additions and 4 deletions
|
|
@ -239,10 +239,9 @@ class Storage {
|
|||
$versions[$i]['version'] = ( end( $parts ) );
|
||||
|
||||
// if file with modified date exists, flag it in array as currently enabled version
|
||||
$curFile['fileName'] = basename( $parts[0] );
|
||||
$curFile['filePath'] = \OCP\Config::getSystemValue('datadirectory').\OC_Filesystem::getRoot().'/'.$curFile['fileName'];
|
||||
|
||||
( \md5_file( $ma ) == \md5_file( $curFile['filePath'] ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 );
|
||||
$files_view = \OCP\Files::getStorage('files');
|
||||
$local_file = $files_view->getLocalFile($filename);
|
||||
( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue