Skip to content

Commit 7401590

Browse files
author
Karl Rieb
committed
Fix authorize example to display full path to output file.
1 parent 498ffb1 commit 7401590

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • examples/authorize/src/main/java/com/dropbox/core/examples/authorize

examples/authorize/src/main/java/com/dropbox/core/examples/authorize/Main.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.dropbox.core.json.JsonReader;
1010

1111
import java.io.BufferedReader;
12+
import java.io.File;
1213
import java.io.InputStreamReader;
1314
import java.io.IOException;
1415
import java.util.logging.Level;
@@ -90,9 +91,10 @@ public static void main(String[] args) throws IOException {
9091

9192
// Save auth information to output file.
9293
DbxAuthInfo authInfo = new DbxAuthInfo(authFinish.getAccessToken(), appInfo.getHost());
94+
File output = new File(argAuthFileOutput);
9395
try {
94-
DbxAuthInfo.Writer.writeToFile(authInfo, argAuthFileOutput);
95-
System.out.println("Saved authorization information to \"" + argAuthFileOutput + "\".");
96+
DbxAuthInfo.Writer.writeToFile(authInfo, output);
97+
System.out.println("Saved authorization information to \"" + output.getCanonicalPath() + "\".");
9698
} catch (IOException ex) {
9799
System.err.println("Error saving to <auth-file-out>: " + ex.getMessage());
98100
System.err.println("Dumping to stderr instead:");

0 commit comments

Comments
 (0)