Revision 8f44fd3a trunk/Pithos.Core/Agents/CloudTransferAction.cs
b/trunk/Pithos.Core/Agents/CloudTransferAction.cs | ||
---|---|---|
139 | 139 |
var capitalizedFileInfo = fileInfo.WithProperCapitalization(); |
140 | 140 |
var fullLocalName = capitalizedFileInfo.FullName; |
141 | 141 |
var othersPath = Path.Combine(accountInfo.AccountPath, FolderConstants.OthersFolder); |
142 |
|
|
142 |
|
|
143 |
ObjectInfo objectInfo; |
|
144 |
|
|
143 | 145 |
var isShared = fullLocalName.StartsWith(othersPath, StringComparison.InvariantCultureIgnoreCase); |
144 | 146 |
if (isShared) |
145 | 147 |
{ |
... | ... | |
147 | 149 |
var otherParts = pathRelativeToOther.Split('\\'); |
148 | 150 |
var otherName = otherParts[0]; |
149 | 151 |
var otherContainer = otherParts[1]; |
150 |
return new ObjectInfo
|
|
152 |
objectInfo=new ObjectInfo
|
|
151 | 153 |
{ |
152 | 154 |
Account = otherName, |
153 | 155 |
Container = otherContainer, |
154 | 156 |
Name = String.Join("/", otherParts.Splice(2)) |
155 | 157 |
}; |
156 | 158 |
} |
157 |
return new ObjectInfo(accountInfo.AccountPath, accountInfo.UserName, fileInfo); |
|
159 |
else |
|
160 |
objectInfo=new ObjectInfo(accountInfo.AccountPath, accountInfo.UserName, fileInfo); |
|
161 |
|
|
162 |
objectInfo.Content_Type= (fileInfo is DirectoryInfo) |
|
163 |
? "appication/directory" |
|
164 |
: "application/octet-stream"; |
|
165 |
return objectInfo; |
|
158 | 166 |
} |
159 | 167 |
} |
160 | 168 |
|
... | ... | |
178 | 186 |
|
179 | 187 |
public override string ToString() |
180 | 188 |
{ |
181 |
return String.Format("{0}: _ <- {1}", this.Action, this.CloudFile.Name);
|
|
189 |
return String.Format("{0}: _ <- {1}", Action, CloudFile.Name);
|
|
182 | 190 |
} |
183 | 191 |
|
184 | 192 |
} |
Also available in: Unified diff