From 74d357f533b49b0d1eeb72606303cfd8a16fb20e Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 30 Jan 2018 16:07:03 +0100 Subject: Parse uids --- sinksh/syntax_modules/sink_inspect.cpp | 2 +- sinksh/syntax_modules/sink_stat.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sinksh/syntax_modules') diff --git a/sinksh/syntax_modules/sink_inspect.cpp b/sinksh/syntax_modules/sink_inspect.cpp index c0aca24..17cf2d5 100644 --- a/sinksh/syntax_modules/sink_inspect.cpp +++ b/sinksh/syntax_modules/sink_inspect.cpp @@ -43,7 +43,7 @@ bool inspect(const QStringList &args, State &state) state.printError(QObject::tr("Options: [--resource $resource] ([--db $db] [--filter $id] [--showinternal] | [--validaterids $type])")); } auto options = SyntaxTree::parseOptions(args); - auto resource = options.options.value("resource").value(0); + auto resource = SinkshUtils::parseUid(options.options.value("resource").value(0).toUtf8()); Sink::Storage::DataStore storage(Sink::storageLocation(), resource, Sink::Storage::DataStore::ReadOnly); auto transaction = storage.createTransaction(Sink::Storage::DataStore::ReadOnly); diff --git a/sinksh/syntax_modules/sink_stat.cpp b/sinksh/syntax_modules/sink_stat.cpp index 926c744..f263bbc 100644 --- a/sinksh/syntax_modules/sink_stat.cpp +++ b/sinksh/syntax_modules/sink_stat.cpp @@ -77,7 +77,7 @@ bool statAllResources(State &state) { Sink::Query query; for (const auto &r : SinkshUtils::getStore("resource").read(query)) { - statResource(r.identifier(), state); + statResource(SinkshUtils::parseUid(r.identifier()), state); } return false; } @@ -89,7 +89,7 @@ bool stat(const QStringList &args, State &state) } for (const auto &r : args) { - statResource(r, state); + statResource(SinkshUtils::parseUid(r.toUtf8()), state); } return false; } -- cgit v1.2.3