mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Merge
--HG-- branch : 1.x
This commit is contained in:
@@ -233,6 +233,11 @@ namespace Orchard.FileSystems.Media {
|
|||||||
throw new ArgumentException(T("File {0} already exists", fileInfo.Name).ToString());
|
throw new ArgumentException(T("File {0} already exists", fileInfo.Name).ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure the directory exists
|
||||||
|
var dirName = Path.GetDirectoryName(fileInfo.FullName);
|
||||||
|
if (!Directory.Exists(dirName)) {
|
||||||
|
Directory.CreateDirectory(dirName);
|
||||||
|
}
|
||||||
File.WriteAllBytes(fileInfo.FullName, new byte[0]);
|
File.WriteAllBytes(fileInfo.FullName, new byte[0]);
|
||||||
|
|
||||||
return new FileSystemStorageFile(Fix(path), fileInfo);
|
return new FileSystemStorageFile(Fix(path), fileInfo);
|
||||||
|
Reference in New Issue
Block a user