From: Aaron Schulz Date: Sat, 25 Aug 2012 19:07:35 +0000 (-0700) Subject: [FileBackend] Use strcmp() for listing comparisons. X-Git-Tag: 1.31.0-rc.0~22564^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=e17b467d407f9d75bbc7c9be78d0556479b5430d;p=lhc%2Fweb%2Fwiklou.git [FileBackend] Use strcmp() for listing comparisons. Change-Id: I60da57bd6cdb77a21763bb34afb51a02d905eb3a --- diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index f54f6667fe..e545b9417a 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -852,13 +852,13 @@ class SwiftFileBackend extends FileBackendStore { // See function "create_container_table" in common/db.py. // If a directory is not "greater" than the last one, // then it was already listed by the calling iterator. - if ( $objectDir > $lastDir ) { + if ( strcmp( $objectDir, $lastDir ) > 0 ) { $pDir = $objectDir; do { // add dir and all its parent dirs $dirs[] = "{$pDir}/"; $pDir = $this->getParentDir( $pDir ); } while ( $pDir !== false // sanity - && $pDir > $lastDir // not done already + && strcmp( $pDir, $lastDir ) > 0 // not done already && strlen( $pDir ) > strlen( $dir ) // within $dir ); }