internal static string NameInArchive(String filename, string directoryPathInArchive)
{
string result = null;
if (directoryPathInArchive == null)
result = filename;
else
{
if (String.IsNullOrEmpty(directoryPathInArchive))
{
result = Path.GetFileName(filename);
}
else
{
// explicitly specify a pathname for this file
result = Path.Combine(directoryPathInArchive, Path.GetFileName(filename));
}
}
//result = Path.GetFullPath(result);
result = SharedUtilities.NormalizePathForUseInZipFile(result);
return result;
}