From 2ee72e2ad2340d707901dc7a5e8520f1cb235916 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 21 Dec 2015 14:55:52 -0500 Subject: [PATCH 1/3] Update version number to 2.7.8 --- lib/Cake/VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/VERSION.txt b/lib/Cake/VERSION.txt index 2fda6bd7c..44218e4c1 100644 --- a/lib/Cake/VERSION.txt +++ b/lib/Cake/VERSION.txt @@ -17,4 +17,4 @@ // @license http://www.opensource.org/licenses/mit-license.php MIT License // +--------------------------------------------------------------------------------------------+ // //////////////////////////////////////////////////////////////////////////////////////////////////// -2.7.7 +2.7.8 From fd021909badefa9e5fc87c2ab49f548d81fe28a8 Mon Sep 17 00:00:00 2001 From: Mark S Date: Tue, 22 Dec 2015 17:10:42 +0100 Subject: [PATCH 2/3] Remove an empty line output --- lib/Cake/Console/cake.bat | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/Cake/Console/cake.bat b/lib/Cake/Console/cake.bat index 3ca534331..905cc39fb 100644 --- a/lib/Cake/Console/cake.bat +++ b/lib/Cake/Console/cake.bat @@ -16,9 +16,6 @@ :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: In order for this script to work as intended, the cake\console\ folder must be in your PATH - -@echo. @echo off SET app=%0 From 7d052bdbc1e5ec4ee226d9694e9efee7987d0fc9 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 24 Dec 2015 16:19:41 -0500 Subject: [PATCH 3/3] Backport 5714cf14a9ca4b439b872aaf3ad6e5bfddda46ad to 2.x Fix file:// paths being mishandled on windows. While I don't think its feasible to fix all the cases reported in #7275 as certain paths have different meaning in windows, we can fix file:// not working. Refs #7275 --- lib/Cake/Test/Case/Utility/FileTest.php | 17 +++++++++++++++++ lib/Cake/Utility/Folder.php | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Utility/FileTest.php b/lib/Cake/Test/Case/Utility/FileTest.php index f596767c4..573a7922f 100644 --- a/lib/Cake/Test/Case/Utility/FileTest.php +++ b/lib/Cake/Test/Case/Utility/FileTest.php @@ -301,6 +301,23 @@ class FileTest extends CakeTestCase { $this->assertTrue($File->exists()); } +/** + * Tests the exists() method. + * + * @return void + */ + public function testExists() { + $tmpFile = TMP . 'tests/cakephp.file.test.tmp'; + $file = new File($tmpFile, true, 0777); + $this->assertTrue($file->exists(), 'absolute path should exist'); + + $file = new File('file://' . $tmpFile, false); + $this->assertTrue($file->exists(), 'file:// should exist.'); + + $file = new File('/something/bad', false); + $this->assertFalse($file->exists(), 'missing file should not exist.'); + } + /** * testOpeningNonExistentFileCreatesIt method * diff --git a/lib/Cake/Utility/Folder.php b/lib/Cake/Utility/Folder.php index 20058f174..e23f70e5a 100644 --- a/lib/Cake/Utility/Folder.php +++ b/lib/Cake/Utility/Folder.php @@ -821,13 +821,13 @@ class Folder { * @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#Folder::realpath */ public function realpath($path) { - $path = str_replace('/', DS, trim($path)); if (strpos($path, '..') === false) { if (!Folder::isAbsolute($path)) { $path = Folder::addPathElement($this->path, $path); } return $path; } + $path = str_replace('/', DS, trim($path)); $parts = explode(DS, $path); $newparts = array(); $newpath = '';