Verified Commit a2f7badd authored by Didier WECKMANN's avatar Didier WECKMANN
Browse files

fix(io): do not ask file twice in case of bad password

parent ba88ae28
......@@ -101,6 +101,7 @@ SReader::~SReader() noexcept = default;
void SReader::starting()
{
m_pimpl->m_passwordRetry = 0;
clearLocations();
}
......@@ -108,6 +109,7 @@ void SReader::starting()
void SReader::stopping()
{
m_pimpl->m_passwordRetry = 0;
clearLocations();
}
......@@ -168,7 +170,7 @@ void SReader::updating()
// Show the save dialog if the path is empty
if((!hasLocationDefined() && m_pimpl->m_dialogPolicy != DialogPolicy::NEVER)
|| m_pimpl->m_dialogPolicy == DialogPolicy::ALWAYS)
|| (m_pimpl->m_dialogPolicy == DialogPolicy::ALWAYS && m_pimpl->m_passwordRetry == 0))
{
openLocationDialog();
}
......@@ -267,7 +269,8 @@ void SReader::updating()
try
{
jobs->run().get();
m_readFailed = false;
m_readFailed = false;
m_pimpl->m_passwordRetry = 0;
}
catch(sight::io::zip::exception::BadPassword& badPassword)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment