1
0
Fork 0
mirror of https://gitlab.com/sbrl/GalleryShare.git synced 2018-06-12 22:45:16 +00:00

Fix file / directory preview path issue.

This commit is contained in:
Starbeamrainbowlabs 2016-07-10 20:49:52 +01:00
parent 548c4829c6
commit dd10edb281

View file

@ -170,7 +170,7 @@ namespace GalleryShare
await xmlData.WriteStartElementAsync(null, "ListingEntry", null); await xmlData.WriteStartElementAsync(null, "ListingEntry", null);
await xmlData.WriteAttributeStringAsync(null, "Type", null, "Directory"); await xmlData.WriteAttributeStringAsync(null, "Type", null, "Directory");
await xmlData.WriteElementStringAsync(null, "Name", null, directoryName.Substring(servingDirectory.Length)); await xmlData.WriteElementStringAsync(null, "Name", null, "/" + directoryName.Substring(servingDirectory.Length));
await xmlData.WriteElementStringAsync(null, "ItemCount", null, Directory.GetFileSystemEntries(directoryName).Length.ToString()); await xmlData.WriteElementStringAsync(null, "ItemCount", null, Directory.GetFileSystemEntries(directoryName).Length.ToString());
// TODO: Write out thumbnail url // TODO: Write out thumbnail url
@ -182,7 +182,7 @@ namespace GalleryShare
await xmlData.WriteStartElementAsync(null, "ListingEntry", null); await xmlData.WriteStartElementAsync(null, "ListingEntry", null);
await xmlData.WriteAttributeStringAsync(null, "Type", null, "File"); await xmlData.WriteAttributeStringAsync(null, "Type", null, "File");
await xmlData.WriteElementStringAsync(null, "Name", null, filename.Substring(servingDirectory.Length)); await xmlData.WriteElementStringAsync(null, "Name", null, "/" + filename.Substring(servingDirectory.Length));
await xmlData.WriteEndElementAsync(); await xmlData.WriteEndElementAsync();
} }