Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
3d4330a1
Commit
3d4330a1
authored
1 year ago
by
Aline Gondim Santos
Browse files
Options
Downloads
Patches
Plain Diff
plugins: fix id grabbing
Change-Id: I9b65b0121d228ab62abaf781c4dc11a6a9380ab4
parent
ea3f484f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugin/jamipluginmanager.cpp
+4
-4
4 additions, 4 deletions
src/plugin/jamipluginmanager.cpp
src/plugin/jamipluginmanager.h
+1
-1
1 addition, 1 deletion
src/plugin/jamipluginmanager.h
with
5 additions
and
5 deletions
src/plugin/jamipluginmanager.cpp
+
4
−
4
View file @
3d4330a1
...
...
@@ -86,7 +86,7 @@ JamiPluginManager::getPluginDetails(const std::string& rootPath, bool reset)
itImage
->
second
.
insert
(
0
,
rootPath
+
DIR_SEPARATOR_CH
+
"data"
+
DIR_SEPARATOR_CH
);
details
[
"soPath"
]
=
rootPath
+
DIR_SEPARATOR_CH
+
LIB_PREFIX
+
details
[
"id"
]
+
LIB_TYPE
;
details
[
"author"
]
=
getPluginAuthor
(
rootPath
,
details
[
"
name
"
]);
details
[
"author"
]
=
getPluginAuthor
(
rootPath
,
details
[
"
id
"
]);
detailsIt
=
pluginDetailsMap_
.
emplace
(
rootPath
,
std
::
move
(
details
)).
first
;
return
detailsIt
->
second
;
}
...
...
@@ -143,7 +143,7 @@ JamiPluginManager::checkPluginSignatureFile(const std::string& jplPath)
try
{
auto
signatures
=
PluginUtils
::
readPluginSignatureFromArchive
(
jplPath
);
auto
manifest
=
PluginUtils
::
readPluginManifestFromArchive
(
jplPath
);
const
std
::
string
&
name
=
manifest
[
"
name
"
];
const
std
::
string
&
name
=
manifest
[
"
id
"
];
auto
filesPath
=
archiver
::
listFilesFromArchive
(
jplPath
);
for
(
const
auto
&
file
:
filesPath
)
{
// we skip the signatures and signatures.sig file
...
...
@@ -225,7 +225,7 @@ JamiPluginManager::installPlugin(const std::string& jplPath, bool force)
if
(
std
::
filesystem
::
is_regular_file
(
jplPath
))
{
try
{
auto
manifestMap
=
PluginUtils
::
readPluginManifestFromArchive
(
jplPath
);
const
std
::
string
&
name
=
manifestMap
[
"
name
"
];
const
std
::
string
&
name
=
manifestMap
[
"
id
"
];
if
(
name
.
empty
())
return
INVALID_PLUGIN
;
auto
cert
=
checkPluginCertificate
(
jplPath
,
force
);
...
...
@@ -294,7 +294,7 @@ JamiPluginManager::uninstallPlugin(const std::string& rootPath)
for
(
const
auto
&
accId
:
jami
::
Manager
::
instance
().
getAccountList
())
dhtnet
::
fileutils
::
removeAll
(
fileutils
::
get_data_dir
()
+
DIR_SEPARATOR_CH
+
accId
+
DIR_SEPARATOR_CH
+
"plugins"
+
DIR_SEPARATOR_CH
+
detailsIt
->
second
.
at
(
"
name
"
));
+
detailsIt
->
second
.
at
(
"
id
"
));
pluginDetailsMap_
.
erase
(
detailsIt
);
}
return
dhtnet
::
fileutils
::
removeAll
(
rootPath
);
...
...
This diff is collapsed.
Click to expand it.
src/plugin/jamipluginmanager.h
+
1
−
1
View file @
3d4330a1
...
...
@@ -70,7 +70,7 @@ public:
* @param reset If true, overrides previous details values
* Reset is only used in the UT for now, but it can be useful
* if we want to reset plugins language without restarting the application
* @return Map where the keyset is {"id", "name", "description", "version", "iconPath", "
image
Path","soPath"}
* @return Map where the keyset is {"id", "name", "description", "version", "iconPath", "
background
Path","soPath"}
*/
std
::
map
<
std
::
string
,
std
::
string
>
getPluginDetails
(
const
std
::
string
&
rootPath
,
bool
reset
=
false
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment