Skip to content

Commit c34a670

Browse files
committed
Added zero file length check
1 parent fc17ba0 commit c34a670

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Program.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,10 @@ internal static DirInfo GetInfo(string root, string di, StreamWriter ffi, Stream
287287
MaxDegreeOfParallelism = Environment.ProcessorCount > 1 ? Environment.ProcessorCount - 1 : 1 },
288288
(fi) =>
289289
{
290-
locSize += GetFileSize(fi);
290+
long fSize = GetFileSize(fi);
291+
if (fSize == 0)
292+
lock (efi) { efi.WriteLine("{0},{1},{2}", new object[] { fi, "File", "Zero length" }); }
293+
locSize += fSize;
291294
string fname = GetName(fi);
292295
string fext = "";
293296
if (fname.IndexOf(".") > -1) fext = fname.Substring(fname.LastIndexOf("."));

0 commit comments

Comments
 (0)