You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/03/08 07:31:15 UTC
git commit: [flex-utilities] [refs/heads/develop] - escape cache
filenames. URLs can have illegal chars for some OS's
Repository: flex-utilities
Updated Branches:
refs/heads/develop c3a906ffa -> 210b268d6
escape cache filenames. URLs can have illegal chars for some OS's
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/210b268d
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/210b268d
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/210b268d
Branch: refs/heads/develop
Commit: 210b268d6be751becd74a90f2902711ec012457f
Parents: c3a906f
Author: Alex Harui <ah...@apache.org>
Authored: Fri Mar 7 22:31:03 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Mar 7 22:31:03 2014 -0800
----------------------------------------------------------------------
ant_on_air/src/org/apache/flex/ant/Ant.as | 5 ++++-
ant_on_air/src/org/apache/flex/ant/tags/Get.as | 4 ++--
installer/src/InstallApacheFlex.mxml | 8 ++++----
3 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/210b268d/ant_on_air/src/org/apache/flex/ant/Ant.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/Ant.as b/ant_on_air/src/org/apache/flex/ant/Ant.as
index b6cde1e..6cc72d9 100644
--- a/ant_on_air/src/org/apache/flex/ant/Ant.as
+++ b/ant_on_air/src/org/apache/flex/ant/Ant.as
@@ -234,7 +234,10 @@ package org.apache.flex.ant
public var output:Function = function(s:String):void { trace(s) };
/**
- * Whether Get uses a download cache
+ * Whether Get uses a download cache. Note that the cache simply
+ * escapes the portion of the URL after the domain and some
+ * file systems like Windows have a path length restriction
+ * so you may need to shorten URLs for really long URLs.
*/
public static var usingDownloadCache:Boolean;
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/210b268d/ant_on_air/src/org/apache/flex/ant/tags/Get.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Get.as b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
index a02e6ad..183c1d2 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Get.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
@@ -105,7 +105,7 @@ package org.apache.flex.ant.tags
c = src.indexOf("/", c + 1);
// that should find the slash after the server.
var cacheFile:File = File.applicationStorageDirectory.resolvePath(Ant.downloadCacheFolder);
- cacheFile = cacheFile.resolvePath(src.substr(c + 1));
+ cacheFile = cacheFile.resolvePath(escape(src.substr(c + 1)));
if (context.verbose)
ant.output(ant.formatOutput("get", "cached file is " + cacheFile.url));
if (cacheFile.exists)
@@ -230,7 +230,7 @@ package org.apache.flex.ant.tags
c = src.indexOf("/", c + 1);
// that should find the slash after the server.
var cacheFile:File = File.applicationStorageDirectory.resolvePath(Ant.downloadCacheFolder);
- cacheFile = cacheFile.resolvePath(src.substr(c + 1));
+ cacheFile = cacheFile.resolvePath(escape(src.substr(c + 1)));
if (context.verbose)
ant.output(ant.formatOutput("get", "cached file is " + cacheFile.url));
if (!cacheFile.exists)
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/210b268d/installer/src/InstallApacheFlex.mxml
----------------------------------------------------------------------
diff --git a/installer/src/InstallApacheFlex.mxml b/installer/src/InstallApacheFlex.mxml
index 022743b..791ce60 100644
--- a/installer/src/InstallApacheFlex.mxml
+++ b/installer/src/InstallApacheFlex.mxml
@@ -1898,7 +1898,7 @@ variables are not required because the locations of these pieces are known.
log("http caching. url = " + cacheURL);
}
var cacheFile:File = File.applicationStorageDirectory.resolvePath(downloadCacheFolder);
- cacheFile = cacheFile.resolvePath(cacheURL);
+ cacheFile = cacheFile.resolvePath(escape(cacheURL));
if (debugMode)
log("searching cache for " + cacheFile.url);
if (cacheFile.exists)
@@ -1960,7 +1960,7 @@ variables are not required because the locations of these pieces are known.
if (cacheURL)
{
var cacheFile:File = File.applicationStorageDirectory.resolvePath(downloadCacheFolder);
- cacheFile = cacheFile.resolvePath(cacheURL);
+ cacheFile = cacheFile.resolvePath(escape(cacheURL));
if (debugMode)
log("caching " + cacheFile.url);
if (!cacheFile.exists)
@@ -2305,7 +2305,7 @@ variables are not required because the locations of these pieces are known.
if (cacheURL)
{
var cacheFile:File = File.applicationStorageDirectory.resolvePath(downloadCacheFolder);
- cacheFile = cacheFile.resolvePath(cacheURL);
+ cacheFile = cacheFile.resolvePath(escape(cacheURL));
if (debugMode)
log("searching cache for " + cacheFile.url);
if (cacheFile.exists)
@@ -2349,7 +2349,7 @@ variables are not required because the locations of these pieces are known.
if (cacheURL && !nocache)
{
var cacheFile:File = File.applicationStorageDirectory.resolvePath(downloadCacheFolder);
- cacheFile = cacheFile.resolvePath(cacheURL);
+ cacheFile = cacheFile.resolvePath(escape(cacheURL));
if (debugMode)
log("caching " + cacheFile.url);
if (!cacheFile.exists)