[
  {
    "Id": "996545",
    "ThreadId": "431992",
    "Html": "I have the following code to create a zipfile;<br />\n<pre><code>   using (Ionic.Zip..ZipFile zip = new Ionic.Zip.ZipFile())\n            {\n                zip.AddSelectedFiles(selection, sourceDirectory, recurse);                    \n                zip.Save(zipFile);\n            }\n</code></pre>\n\nwhere selection is: (name != <em>.log) AND (name != </em>.log.txt)\r<br />\nsourceDirectory: \\isis-abdev-pm1\\c$\\inetpub\\wwwroot\r<br />\nrecurse: true\r<br />\n<br />\nWhen this is called I get the error: The entry name must be non-null and non-empty.\r<br />\nStackTrace:\r<br />\nat Ionic.Zip.ZipEntry.Create(String nameInArchive, ZipEntrySource source, Object arg1, Object arg2)\r<br />\n   at Ionic.Zip.ZipFile.AddOrUpdateDirectoryImpl(String directoryName, String rootDirectoryPathInArchive, AddOrUpdateAction action, Boolean recurse, Int32 level)\r<br />\n   at Ionic.Zip.ZipFile._AddOrUpdateSelectedFiles(String selectionCriteria, String directoryOnDisk, String directoryPathInArchive, Boolean recurseDirectories, Boolean wantUpdate)\r<br />\n   at Ionic.Zip.ZipFile.AddSelectedFiles(String selectionCriteria, String directoryOnDisk, Boolean recurseDirectories)\r<br />\n   at UtilityFunctions.ZipDirectory(String zipFile, String sourceDirectory, Boolean recurse, String excludeFileFilter) in C:\\c\\UtilityFunctions.cs:line 202 (UtilityFunctions.ZipDirectory(C:\\c\\UtilityFunctions.cs:208))\r<br />\n<br />\nHowever when I do the same but my selection is: name = <em>.log AND name = </em>.log.txt I get no error, but as expected the zip-file does not contain files.\r<br />\n<br />\nUsing other selections with &quot;name !&quot;= or &quot;filename !=&quot; result all in the same error, for example name != *.log also results in the error.\r<br />\n<br />\nI need to zip a whole directory all the files expect the <em>.log and </em>.log.txt files. Can somebody explain what I am doing wrong?<br />\n",
    "PostedDate": "2013-02-05T01:07:02.71-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]