#20397: Exceptions are not used for flow control anymore in some storage services

Work Item: 20397

Signed-off-by: Zoltán Lehóczky <lehoczky_zoltan@pyrocenter.hu>
This commit is contained in:
Lombiq
2014-06-25 15:33:48 +02:00
committed by Zoltán Lehóczky
parent e069781d41
commit aa397faa17
2 changed files with 8 additions and 0 deletions

View File

@@ -23,6 +23,10 @@ namespace Orchard.Azure.Services.FileSystems.Media {
public bool TrySaveStream(string path, Stream inputStream) {
try {
if (FileExists(path)) {
return false;
}
SaveStream(path, inputStream);
}
catch {

View File

@@ -298,6 +298,10 @@ namespace Orchard.FileSystems.Media {
/// <returns>True if success; False otherwise.</returns>
public bool TrySaveStream(string path, Stream inputStream) {
try {
if (FileExists(path)) {
return false;
}
SaveStream(path, inputStream);
}
catch {