You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/09/06 07:13:10 UTC
[1/5] git commit: [iOS] Simplify the code in resolveLocalFileSystemURI
Updated Branches:
refs/heads/master f6c3c6a28 -> 1fb457704
[iOS] Simplify the code in resolveLocalFileSystemURI
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/e27899c3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/e27899c3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/e27899c3
Branch: refs/heads/master
Commit: e27899c326ef6a65d80b7d9e328943a40b6557ff
Parents: f6c3c6a
Author: lmnbeyond <lm...@gmail.com>
Authored: Mon Jul 29 19:50:42 2013 +0800
Committer: Max Woghiren <ma...@gmail.com>
Committed: Wed Aug 28 10:56:35 2013 -0400
----------------------------------------------------------------------
src/ios/CDVFile.m | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/e27899c3/src/ios/CDVFile.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVFile.m b/src/ios/CDVFile.m
index c245ee3..6b2602d 100644
--- a/src/ios/CDVFile.m
+++ b/src/ios/CDVFile.m
@@ -233,19 +233,14 @@ NSString* const kCDVAssetsLibraryPrefix = @"assets-library://";
// see if exists and is file or dir
BOOL bExists = [fileMgr fileExistsAtPath:path isDirectory:&isDir];
if (bExists) {
- // see if it contains docs path
- NSRange range = [path rangeOfString:self.appDocsPath];
+ // see if it contains docs path or temp path
NSString* foundFullPath = nil;
- // there's probably an api or easier way to figure out the path type but I can't find it!
- if ((range.location != NSNotFound) && (range.length == [self.appDocsPath length])) {
+ if ([path hasPrefix:self.appDocsPath]) {
foundFullPath = self.appDocsPath;
- } else {
- // see if it contains the temp path
- range = [path rangeOfString:self.appTempPath];
- if ((range.location != NSNotFound) && (range.length == [self.appTempPath length])) {
- foundFullPath = self.appTempPath;
- }
+ } else if ([path hasPrefix:self.appTempPath]) {
+ foundFullPath = self.appTempPath;
}
+
if (foundFullPath == nil) {
// error SECURITY_ERR - not one of the two paths types supported
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:SECURITY_ERR];
[3/5] git commit: CB-4514: Making DirectoryCopy Recursive
Posted by ag...@apache.org.
CB-4514: Making DirectoryCopy Recursive
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/995270e1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/995270e1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/995270e1
Branch: refs/heads/master
Commit: 995270e1f1078cf313aa1d17a09472b399f4f909
Parents: c242926
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Sep 4 15:39:13 2013 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Sep 4 15:39:13 2013 -0700
----------------------------------------------------------------------
src/android/FileUtils.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/995270e1/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index 892c12c..1c99c38 100755
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -487,12 +487,13 @@ public class FileUtils extends CordovaPlugin {
throw new NoModificationAllowedException("Couldn't create the destination directory");
}
}
+
for (File file : srcDir.listFiles()) {
+ File destination = new File(destinationDir.getAbsoluteFile() + File.separator + file.getName());
if (file.isDirectory()) {
- copyDirectory(file, destinationDir);
+ copyDirectory(file, destination);
} else {
- File destination = new File(destinationDir.getAbsoluteFile() + File.separator + file.getName());
copyFile(file, destination);
}
}
[4/5] git commit: CB-4665: Deleted misplaced comment
Posted by ag...@apache.org.
CB-4665: Deleted misplaced comment
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/371cfc13
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/371cfc13
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/371cfc13
Branch: refs/heads/master
Commit: 371cfc13df0d9c885d595a3fbc2b578baa265e59
Parents: 995270e
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Sep 5 15:41:03 2013 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Sep 5 15:41:03 2013 -0700
----------------------------------------------------------------------
src/android/FileUtils.java | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/371cfc13/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index 1c99c38..a42b9cc 100755
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -913,11 +913,6 @@ public class FileUtils extends CordovaPlugin {
return getEntry(new File(path));
}
-
- //--------------------------------------------------------------------------
- // LOCAL METHODS
- //--------------------------------------------------------------------------
-
/**
* Read the contents of a file.
* This is done in a background thread; the result is sent to the callback.
[5/5] git commit: [CB-4752] Updated version and changelog
Posted by ag...@apache.org.
[CB-4752] Updated version and changelog
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/1fb45770
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/1fb45770
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/1fb45770
Branch: refs/heads/master
Commit: 1fb457704d583b28dd4c0d00deb8fbc53d1abdb3
Parents: 371cfc1
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Sep 5 23:55:26 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Sep 6 00:25:36 2013 -0400
----------------------------------------------------------------------
CHANGELOG.md | 26 ++++++++++++++++++++++++++
plugin.xml | 2 +-
2 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/1fb45770/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..9239ecb
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,26 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
+# Release Notes
+
+### 0.2.1 (Sept 5, 2013)
+* [CB-4656] Don't add newlines in data urls within readAsDataUrl.
+* [CB-4514] Making DirectoryCopy Recursive
+* [iOS] Simplify the code in resolveLocalFileSystemURI
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/1fb45770/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 794d645..5d2d222 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -3,7 +3,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.core.file"
- version="0.2.0">
+ version="0.2.1">
<name>File</name>
<description>Cordova File Plugin</description>
<license>Apache 2.0</license>
[2/5] git commit: [CB-4656] Don't add newlines in data urls within
readAsDataUrl.
Posted by ag...@apache.org.
[CB-4656] Don't add newlines in data urls within readAsDataUrl.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/c2429260
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/c2429260
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/c2429260
Branch: refs/heads/master
Commit: c2429260f83a04d9e888689908d4b99b268404b3
Parents: e27899c
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Aug 29 14:19:22 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Aug 29 14:19:22 2013 -0400
----------------------------------------------------------------------
src/android/FileUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/c2429260/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index 2da2868..892c12c 100755
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -948,7 +948,7 @@ public class FileUtils extends CordovaPlugin {
break;
default: // Base64.
String contentType = FileHelper.getMimeType(filename, cordova);
- byte[] base64 = Base64.encode(bytes, Base64.DEFAULT);
+ byte[] base64 = Base64.encode(bytes, Base64.NO_WRAP);
String s = "data:" + contentType + ";base64," + new String(base64, "US-ASCII");
result = new PluginResult(PluginResult.Status.OK, s);
}