#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-07-03 11:02:53 +02:00
committed by Zoltán Lehóczky
parent e069781d41
commit aa397faa17
2 changed files with 8 additions and 0 deletions
@@ -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 {
@@ -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 {