aboutsummaryrefslogtreecommitdiff
path: root/src/bookmarks/builtins.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks/builtins.cpp')
-rw-r--r--src/bookmarks/builtins.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bookmarks/builtins.cpp b/src/bookmarks/builtins.cpp
index 2e97e1a..f7b6f3f 100644
--- a/src/bookmarks/builtins.cpp
+++ b/src/bookmarks/builtins.cpp
@@ -54,8 +54,10 @@ int builtins::bookmarks(const std::string &progname, std::vector<std::string>::c
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
BookmarkFormat<XbelFormat>(&f) >> model;
f.close();
- } else
+ } else {
spdlog::error("Could not open %s", i);
+ return -1;
+ }
}
for(const auto &i : args::get(import_json)) {
@@ -63,8 +65,10 @@ int builtins::bookmarks(const std::string &progname, std::vector<std::string>::c
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
BookmarkFormat<FirefoxJsonFormat>(&f) >> model;
f.close();
- } else
+ } else {
spdlog::error("Could not open %s", i);
+ return -1;
+ }
}
QIODevice *output = nullptr;
@@ -85,8 +89,10 @@ int builtins::bookmarks(const std::string &progname, std::vector<std::string>::c
}
if(!output->isOpen()) {
- if(!output->open(QIODevice::ReadWrite | QIODevice::Text))
+ if(!output->open(QIODevice::ReadWrite | QIODevice::Text)) {
spdlog::error("Could not open output");
+ return -1;
+ }
}
BookmarkFormat<XbelFormat> format(output);