From: Jakub Skowron Date: Wed, 7 Feb 2018 14:02:53 +0000 (+0100) Subject: [Filesystem] Fix return on error in FileWriteString and FileWriteBytes X-Git-Tag: accepted/tizen/3.0/common/20180305.083113~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F169573%2F1;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Filesystem] Fix return on error in FileWriteString and FileWriteBytes Change-Id: I0377b1a7eaa60a1b5d50c759005d2c6063400332 Signed-off-by: Jakub Skowron --- diff --git a/src/filesystem/filesystem_instance.cc b/src/filesystem/filesystem_instance.cc index eaceadc..fbd555f 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); }