You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2016/03/10 20:18:42 UTC

[1/2] cordova-plugin-file git commit: CB-10577: Windows resolveLocalFileSystemURL should omit trailing slash for file

Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master 3eae249cc -> f863542a7


CB-10577: Windows resolveLocalFileSystemURL should omit trailing slash for file


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/2132bbf2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/2132bbf2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/2132bbf2

Branch: refs/heads/master
Commit: 2132bbf2d8bd1d45f500270b64f348f8ba001b75
Parents: 3e09b31
Author: Jason Ginchereau <ja...@microsoft.com>
Authored: Wed Mar 9 09:54:44 2016 -0800
Committer: Jason Ginchereau <ja...@microsoft.com>
Committed: Wed Mar 9 10:00:12 2016 -0800

----------------------------------------------------------------------
 www/FileEntry.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/2132bbf2/www/FileEntry.js
----------------------------------------------------------------------
diff --git a/www/FileEntry.js b/www/FileEntry.js
index a03e37f..c0b7c64 100644
--- a/www/FileEntry.js
+++ b/www/FileEntry.js
@@ -36,7 +36,15 @@ var utils = require('cordova/utils'),
  * {FileSystem} filesystem on which the file resides (readonly)
  */
 var FileEntry = function(name, fullPath, fileSystem, nativeURL) {
-     FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath, fileSystem, nativeURL]);
+    // remove trailing slash if it is present
+    if (fullPath && /\/$/.test(fullPath)) {
+        fullPath = fullPath.substring(0, fullPath.length - 1);
+    }
+    if (nativeURL && /\/$/.test(nativeURL)) {
+        nativeURL = nativeURL.substring(0, nativeURL.length - 1);
+    }
+
+    FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath, fileSystem, nativeURL]);
 };
 
 utils.extend(FileEntry, Entry);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/2] cordova-plugin-file git commit: Merge branch 'CB-10577a' of https://github.com/jasongin/cordova-plugin-file

Posted by pu...@apache.org.
Merge branch 'CB-10577a' of https://github.com/jasongin/cordova-plugin-file


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/f863542a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/f863542a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/f863542a

Branch: refs/heads/master
Commit: f863542a7f8fc70e922c358eb132265b181b51e1
Parents: 3eae249 2132bbf
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Mar 10 11:16:48 2016 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Mar 10 11:16:48 2016 -0800

----------------------------------------------------------------------
 www/FileEntry.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org