Fixed issue #2066: The command create-report appends zip even if output-file name already ends with .zip

This commit is contained in:
Albertony
2017-03-20 13:35:30 +01:00
parent 4e683893bb
commit 4e1a638fca
@@ -38,8 +38,8 @@ namespace Duplicati.Library.Main.Operation
{
var ext = System.IO.Path.GetExtension(m_targetpath);
var module = m_options.CompressionModule;
if (ext != module)
if (ext == "" || string.Compare(ext, 1, module, 0, module.Length, StringComparison.OrdinalIgnoreCase) != 0)
m_targetpath = m_targetpath + "." + module;
if (System.IO.File.Exists(m_targetpath))