sanvlr12 / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
0 stars 0 forks source link

Samples ReadFile method should use the computed fully qualified path #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Execute enterCredentials.cmd with the appropriate arguments
2. Build the samples solution
3. Run Books.ListsMyLibrary (user will prompted to authorize application, and 
it will correctly list libraries)
4. Run Books.ListsMyLibrary and it fail because it cannot read the cached token 
data file (google.samples.dotnet.books.auth).

What is the expected output? What do you see instead?

It should return the data every time it is run, and not fail do to the file 
being missing.

What version of the product are you using? On what operating system?

changeset:   19:24caf3c1eb1c
tag:         tip
user:        mlinder@google.com
date:        Thu Aug 18 13:22:45 2011 -0400
summary:     Added tag 20110818-0.9.4 for changeset efa92b2bb690

Please provide any additional information below.

Apply the following path to fix the issue.

diff -r 24caf3c1eb1c SampleHelper/AppData.cs
--- a/SampleHelper/AppData.cs   Thu Aug 18 13:22:45 2011 -0400
+++ b/SampleHelper/AppData.cs   Fri Aug 19 14:19:05 2011 -0400
@@ -57,7 +57,7 @@
         public static byte[] ReadFile(string file)
         {
             string path = GetFilePath(file);
-            return File.Exists(path) ? File.ReadAllBytes(file) : null;
+            return File.Exists(path) ? File.ReadAllBytes(path) : null;
         }

         /// <summary>

Original issue reported on code.google.com by boume...@gmail.com on 19 Aug 2011 at 6:25

GoogleCodeExporter commented 9 years ago
Thanks for your bug report! I have fixed issue #126 and #127 in revision 20. 
The samples should now work again.

Original comment by mlin...@google.com on 19 Aug 2011 at 6:46