Skip to content

Commit 06ccf66

Browse files
committed
fix
1 parent eef65e5 commit 06ccf66

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sdk/QiniuResumbleUploadEx.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@ public ResumbleUploadEx (string filename, string puttedCtxDir=null){
4848
}
4949
this.fileName = filename;
5050
if (puttedCtxDir != null) {
51-
if (Directory.Exists (puttedCtxDir)) {
52-
throw new Exception (string.Format ("{0} does not exist", puttedCtxDir));
51+
if (!Directory.Exists (puttedCtxDir)) {
52+
try{
53+
Directory.CreateDirectory (puttedCtxDir);
54+
}
55+
catch(Exception e){
56+
throw e;
57+
}
5358
}
5459
this.puttedCtxDir = puttedCtxDir;
5560
} else {

0 commit comments

Comments
 (0)