diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-12 15:30:10 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-12 15:30:10 +0100 |
commit | a05820c6594aa3ea6f2394e8d75117d339f06ed3 (patch) | |
tree | 4f99621cb9b7fb2b5ea459d4732513b1043e58da /lib/files/mapper.php | |
parent | 818c24bd4578c151c412939ad47b20d649bd68a5 (diff) | |
download | nextcloud-server-a05820c6594aa3ea6f2394e8d75117d339f06ed3.tar.gz nextcloud-server-a05820c6594aa3ea6f2394e8d75117d339f06ed3.zip |
fixing various filesystem/storage unit tests on windows
fixing copy operation on mapper
Diffstat (limited to 'lib/files/mapper.php')
-rw-r--r-- | lib/files/mapper.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/files/mapper.php b/lib/files/mapper.php index d65726d68de..179e28e5e76 100644 --- a/lib/files/mapper.php +++ b/lib/files/mapper.php @@ -77,7 +77,9 @@ class Mapper $result = $query->execute(array($path1.'%')); $updateQuery = \OC_DB::prepare('UPDATE `*PREFIX*file_map`' .' SET `logic_path` = ?' - .' AND `physic_path` = ?' + .' , `logic_path_hash` = ?' + .' , `physic_path` = ?' + .' , `physic_path_hash` = ?' .' WHERE `logic_path` = ?'); while( $row = $result->fetchRow()) { $currentLogic = $row['logic_path']; @@ -86,7 +88,7 @@ class Mapper $newPhysic = $physicPath2.$this->stripRootFolder($currentPhysic, $physicPath1); if ($path1 !== $currentLogic) { try { - $updateQuery->execute(array($newLogic, $newPhysic, $currentLogic)); + $updateQuery->execute(array($newLogic, md5($newLogic), $newPhysic, md5($newPhysic), $currentLogic)); } catch (\Exception $e) { error_log('Mapper::Copy failed '.$currentLogic.' -> '.$newLogic.'\n'.$e); throw $e; @@ -190,7 +192,7 @@ class Mapper array_push($sluggedElements, $last.'-'.$index); } - $sluggedPath = $this->unchangedPhysicalRoot.implode(DIRECTORY_SEPARATOR, $sluggedElements); + $sluggedPath = $this->unchangedPhysicalRoot.implode('/', $sluggedElements); return $this->stripLast($sluggedPath); } |