Skip to content
Snippets Groups Projects
Commit 878def4c authored by Sébastien Blin's avatar Sébastien Blin
Browse files

ringtones: customRingtone can be an absolute or relative path

Change-Id: I434255ea4caf66c630927bdfea572c49e7e1c658
GitLab: #748
parent 13e9fe9a
No related branches found
No related tags found
No related merge requests found
......@@ -289,9 +289,8 @@ Account::unserialize(const YAML::Node& node)
// If the user defined a custom ringtone, the file may not exists
// In this case, fallback on the default ringtone path (this will be set during the next
// setAccountDetails)
auto pathRingtone = std::string(JAMI_DATADIR) + DIR_SEPARATOR_STR + RINGDIR
+ DIR_SEPARATOR_STR + ringtonePath_;
if (!fileutils::isFile(pathRingtone)) {
auto pathRingtone = fmt::format("{}/{}/{}", JAMI_DATADIR, RINGDIR, ringtonePath_);
if (!fileutils::isFile(ringtonePath_) && !fileutils::isFile(pathRingtone)) {
JAMI_WARN("Ringtone %s is not a valid file", pathRingtone.c_str());
ringtonePath_ = DEFAULT_RINGTONE_PATH;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment