diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-30 16:07:03 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-30 16:07:03 +0100 |
commit | 74d357f533b49b0d1eeb72606303cfd8a16fb20e (patch) | |
tree | 3cb8360639fe2880d0458532e45abf1e04513a3c /sinksh | |
parent | ba0ba8f7a84995837eb818591fe0b15bd328fef5 (diff) | |
download | sink-74d357f533b49b0d1eeb72606303cfd8a16fb20e.tar.gz sink-74d357f533b49b0d1eeb72606303cfd8a16fb20e.zip |
Parse uids
Diffstat (limited to 'sinksh')
-rw-r--r-- | sinksh/syntax_modules/sink_inspect.cpp | 2 | ||||
-rw-r--r-- | sinksh/syntax_modules/sink_stat.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
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) | |||
43 | state.printError(QObject::tr("Options: [--resource $resource] ([--db $db] [--filter $id] [--showinternal] | [--validaterids $type])")); | 43 | state.printError(QObject::tr("Options: [--resource $resource] ([--db $db] [--filter $id] [--showinternal] | [--validaterids $type])")); |
44 | } | 44 | } |
45 | auto options = SyntaxTree::parseOptions(args); | 45 | auto options = SyntaxTree::parseOptions(args); |
46 | auto resource = options.options.value("resource").value(0); | 46 | auto resource = SinkshUtils::parseUid(options.options.value("resource").value(0).toUtf8()); |
47 | 47 | ||
48 | Sink::Storage::DataStore storage(Sink::storageLocation(), resource, Sink::Storage::DataStore::ReadOnly); | 48 | Sink::Storage::DataStore storage(Sink::storageLocation(), resource, Sink::Storage::DataStore::ReadOnly); |
49 | auto transaction = storage.createTransaction(Sink::Storage::DataStore::ReadOnly); | 49 | 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) | |||
77 | { | 77 | { |
78 | Sink::Query query; | 78 | Sink::Query query; |
79 | for (const auto &r : SinkshUtils::getStore("resource").read(query)) { | 79 | for (const auto &r : SinkshUtils::getStore("resource").read(query)) { |
80 | statResource(r.identifier(), state); | 80 | statResource(SinkshUtils::parseUid(r.identifier()), state); |
81 | } | 81 | } |
82 | return false; | 82 | return false; |
83 | } | 83 | } |
@@ -89,7 +89,7 @@ bool stat(const QStringList &args, State &state) | |||
89 | } | 89 | } |
90 | 90 | ||
91 | for (const auto &r : args) { | 91 | for (const auto &r : args) { |
92 | statResource(r, state); | 92 | statResource(SinkshUtils::parseUid(r.toUtf8()), state); |
93 | } | 93 | } |
94 | return false; | 94 | return false; |
95 | } | 95 | } |