Creates directories for zipped files if they do not exist
This commit is contained in:
parent
0802c7120b
commit
f6ced73b9f
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
@ -23,6 +23,7 @@ namespace Fab2ApprovalSystem.Misc
|
||||
/// <param name="folderName"></param>
|
||||
public void CreateZip(string outPathname, string folderName) {
|
||||
// TODO Try and Catch block
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(outPathname));
|
||||
|
||||
FileStream fsOut = File.Create(outPathname);
|
||||
ZipOutputStream zipStream = new ZipOutputStream(fsOut);
|
||||
@ -95,4 +96,4 @@ namespace Fab2ApprovalSystem.Misc
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user