Merged r1272 into 1.3.2 branch

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1277 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
kenneth@hexad.dk
2012-05-14 18:56:45 +00:00
parent 3dc3e9d90c
commit b75b2b4d76
3 changed files with 37 additions and 7 deletions
@@ -162,11 +162,29 @@ namespace Duplicati.Library.Backend
foreach (Google.Documents.Document d in parentlookup.Values)
{
string[] p = new string[d.ParentFolders.Count + 1];
for (int i = 0; i < p.Length - 1; i++)
p[i] = parentlookup[d.ParentFolders[i]].Title;
List<Google.Documents.Document> parents = new List<Google.Documents.Document>();
Google.Documents.Document cur = d;
while (cur.ParentFolders.Count == 1)
{
parents.Add(cur);
cur = parentlookup[cur.ParentFolders[0]];
}
parents.Add(cur);
if (cur.ParentFolders.Count != 0)
{
string[] pids = new string[cur.ParentFolders.Count];
for(int i = 0; i < pids.Length; i++)
pids[i] = parentlookup[cur.ParentFolders[i]].Title;
throw new Exception(string.Format(Strings.GoogleDocs.FolderHasMultipleOwnersError, cur.Title, string.Join(", ", pids)));
}
parents.Reverse();
string[] p = new string[parents.Count];
for (int i = 0; i < p.Length; i++)
p[i] = parents[i].Title;
p[p.Length - 1] = d.Title;
string key = string.Join("/", p);
if (dict.ContainsKey(key))
throw new Exception(string.Format(Strings.GoogleDocs.DuplicateFoldernameFoundError, key));
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.239
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -204,6 +204,15 @@ namespace Duplicati.Library.Backend.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to The folder {0} is owned by multiple parents: {1}, this is not supported.
/// </summary>
internal static string FolderHasMultipleOwnersError {
get {
return ResourceManager.GetString("FolderHasMultipleOwnersError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The nonce returned was not recognized: {0}.
/// </summary>
@@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CaptchaRequiredError" xml:space="preserve">
<value>The account access has been blocked by Google, please visit this URL and unlock it: {0}</value>
@@ -165,6 +165,9 @@
<data name="FileIsReadOnlyError" xml:space="preserve">
<value>The requested file is read-only: {0}</value>
</data>
<data name="FolderHasMultipleOwnersError" xml:space="preserve">
<value>The folder {0} is owned by multiple parents: {1}, this is not supported</value>
</data>
<data name="InvalidNonceError" xml:space="preserve">
<value>The nonce returned was not recognized: {0}</value>
</data>