Skip to content

Instantly share code, notes, and snippets.

@abjerner
Created March 2, 2014 13:14
Show Gist options
  • Save abjerner/9306381 to your computer and use it in GitHub Desktop.
Save abjerner/9306381 to your computer and use it in GitHub Desktop.
Small snippet for finding the path to the user's local Dropbox folder.
private static string GetDropboxPath() {
string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string dbPath = Path.Combine(appDataPath, "Dropbox\\host.db");
if (!File.Exists(dbPath)) return null;
string[] lines = File.ReadAllLines(dbPath);
return Encoding.UTF8.GetString(Convert.FromBase64String(lines[1]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment