summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-07-21 19:18:26 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-07-21 19:18:26 -0400
commit0387cc5f1f289299fffb3d913ff6efb676dfa5bc (patch)
treef7b9fbcfcecb382c5de474ec60d00514b5d46032 /lib
parent302527c2d654f87d064e4dd0a5cb0609e9aedec5 (diff)
parent9d1c5c855bb1e5708d46960b3ad08acd805a6186 (diff)
downloadnextcloud-server-0387cc5f1f289299fffb3d913ff6efb676dfa5bc.tar.gz
nextcloud-server-0387cc5f1f289299fffb3d913ff6efb676dfa5bc.zip
Merge branch 'master' into sharing
Diffstat (limited to 'lib')
-rw-r--r--lib/filestorage.php4
-rw-r--r--lib/setup.php4
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/filestorage.php b/lib/filestorage.php
index c2614dc5dcf..95e8c31eff2 100644
--- a/lib/filestorage.php
+++ b/lib/filestorage.php
@@ -56,6 +56,7 @@ class OC_FILESTORAGE{
public function hash($type,$path,$raw){}
public function free_space($path){}
public function search($query){}
+ public function getLocalFile($path){}// get a path to a local version of the file, whether the original file is local or remote
}
@@ -376,6 +377,9 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
public function search($query){
return $this->searchInDir($query);
}
+ public function getLocalFile($path){
+ return $this->datadir.$path;
+ }
private function searchInDir($query,$dir=''){
$files=array();
diff --git a/lib/setup.php b/lib/setup.php
index 1a33209ec57..63ba4daab54 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -131,7 +131,9 @@ class OC_SETUP {
}
else {
//delete the old sqlite database first, might cause infinte loops otherwise
- unlink("$datadir/owncloud.db");
+ if(file_exists("$datadir/owncloud.db")){
+ unlink("$datadir/owncloud.db");
+ }
//in case of sqlite, we can always fill the database
OC_DB::createDbFromStructure('db_structure.xml');
}