From 359a29874b39d9826b79299db8a0ca5cae5ac5ef Mon Sep 17 00:00:00 2001 From: Randall Luecke Date: Mon, 24 May 2010 22:44:14 -0500 Subject: [PATCH] Return a copy instead of the array itself. --- Foundation/CPURL.j | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Foundation/CPURL.j b/Foundation/CPURL.j index e6235ab90..dc240fbaa 100644 --- a/Foundation/CPURL.j +++ b/Foundation/CPURL.j @@ -96,7 +96,8 @@ CPURLCustomIconKey = @"CPURLCustomIconKey"; - (CPArray)pathComponents { - return self.pathComponents(); + var path = self.pathComponents(); + return [path copy]; } // if absolute, returns the same as path