This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed uploading to SkyDrive doesn't upload DB's timestamp.

  • Loading branch information...
7Pass committed Jun 3, 2012
1 parent 5c9a5dd commit 68cecd392b32938f2a365e3f8289eb5b3721cda9
Showing with 12 additions and 7 deletions.
  1. +9 −4 KeePass/Sources/SkyDrive/SkyDriveAdapter.cs
  2. +3 −3 KeePass/Sources/SkyDrive/SkyDriveClient.cs
@@ -17,7 +17,7 @@ internal class SkyDriveAdapter : ServiceAdapterBase
var name = GetNonConflictName(meta.Title);
_client.Upload(meta.Parent, name, _info.Database,
- x => uploaded(item, x, name));
+ (id, data) => uploaded(item, data, name));
}
private static string GetNonConflictName(string name)
@@ -80,10 +80,15 @@ public override void List(Action<ListItem> ready)
{
var meta = (MetaListItemInfo)item.Tag;
_client.Upload(meta.Parent, meta.Title,
- _info.Database, x =>
+ _info.Database, (path, data) =>
{
- _info.Path = x;
- uploaded(item);
+ _info.Path = data;
+ _client.GetFileMeta(path, info =>
+ uploaded(new ListItem
+ {
+ Tag = info,
+ Timestamp = info.Modified,
+ }));
});
}
@@ -229,7 +229,7 @@ public void RefreshToken(Action completed)
public void Upload(string folder,
string name, byte[] content,
- Action<string> completed)
+ Action<string, string> completed)
{
var request = Request("{folder}/files/");
request.Method = Method.POST;
@@ -246,8 +246,8 @@ public void RefreshToken(Action completed)
return;
var path = root.GetValue("id");
- path = GetSyncPath(path);
- completed(path);
+ var pathData = GetSyncPath(path);
+ completed(path, pathData);
});
}

0 comments on commit 68cecd3

Please sign in to comment.