You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by vi...@apache.org on 2012/09/05 20:08:38 UTC

wp7 commit: allow appending to files

Updated Branches:
  refs/heads/master 1fa215cff -> 2fd27cb05


allow appending to files


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/2fd27cb0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/2fd27cb0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/2fd27cb0

Branch: refs/heads/master
Commit: 2fd27cb05b138a28102032214779945a1b22d3fb
Parents: 1fa215c
Author: unknown <wkoller@VirasPC.(none)>
Authored: Wed Sep 5 19:58:14 2012 +0200
Committer: unknown <wkoller@VirasPC.(none)>
Committed: Wed Sep 5 19:58:14 2012 +0200

----------------------------------------------------------------------
 templates/standalone/cordovalib/Commands/File.cs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/2fd27cb0/templates/standalone/cordovalib/Commands/File.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/Commands/File.cs b/templates/standalone/cordovalib/Commands/File.cs
index bc1d501..579dd6e 100644
--- a/templates/standalone/cordovalib/Commands/File.cs
+++ b/templates/standalone/cordovalib/Commands/File.cs
@@ -1,4 +1,4 @@
-/*  
+/*  
 	Licensed 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
@@ -650,7 +650,7 @@ namespace WP7CordovaClassLib.Cordova.Commands
 
                     using (FileStream stream = new IsolatedStorageFileStream(filePath, FileMode.Open, FileAccess.ReadWrite, isoFile))
                     {
-                        if (0 <= size && size < stream.Length)
+                        if (0 <= size && size <= stream.Length)
                         {
                             stream.SetLength(size);
                         }
@@ -700,7 +700,7 @@ namespace WP7CordovaClassLib.Cordova.Commands
 
                     using (FileStream stream = new IsolatedStorageFileStream(filePath, FileMode.Open, FileAccess.ReadWrite, isoFile))
                     {
-                        if (0 <= position && position < stream.Length)
+                        if (0 <= position && position <= stream.Length)
                         {
                             stream.SetLength(position);
                         }