From ef32d62d2e9b62628e4db33dd25c1c903c018213 Mon Sep 17 00:00:00 2001 From: Jakub Skowron Date: Wed, 7 Feb 2018 15:02:53 +0100 Subject: [PATCH] [Filesystem] Fix return on error in FileWriteString and FileWriteBytes Change-Id: I0377b1a7eaa60a1b5d50c759005d2c6063400332 Signed-off-by: Jakub Skowron --- src/filesystem/filesystem_instance.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/filesystem/filesystem_instance.cc b/src/filesystem/filesystem_instance.cc index eaceadc8..fbd555fd 100644 --- a/src/filesystem/filesystem_instance.cc +++ b/src/filesystem/filesystem_instance.cc @@ -397,7 +397,9 @@ void FilesystemInstance::FileWriteString(const picojson::value& args, picojson:: } catch (std::runtime_error& e) { LoggerE("Cannot write to file %s, cause: %s", location.c_str(), e.what()); PrepareError(FilesystemError::Other, out); + return; } + ReportSuccess(out); } @@ -421,7 +423,9 @@ void FilesystemInstance::FileWriteBytes(const picojson::value& args, picojson::o } catch (std::runtime_error& e) { LoggerE("Cannot write to %s, cause: %s", location.c_str(), e.what()); PrepareError(FilesystemError::Other, out); + return; } + ReportSuccess(out); } -- 2.34.1