mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 12:46:35 +01:00
[PAC] Don't copy local PAC files into profile.
This commit is contained in:
parent
41616486a6
commit
28d697b94c
@ -61,6 +61,16 @@ void PacManager::downloadPacFile()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_url.isLocalFile()) {
|
||||||
|
if (!QFile(m_url.path()).exists()) {
|
||||||
|
qWarning() << "PacManager: PAC file " << m_url.path() << "doesn't exists!";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
reloadScript();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_reply = new FollowRedirectReply(m_url, mApp->networkManager());
|
m_reply = new FollowRedirectReply(m_url, mApp->networkManager());
|
||||||
connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
|
connect(m_reply, SIGNAL(finished()), this, SLOT(replyFinished()));
|
||||||
}
|
}
|
||||||
@ -107,7 +117,7 @@ void PacManager::reloadScript()
|
|||||||
m_pacrunner = new ProxyAutoConfig(this);
|
m_pacrunner = new ProxyAutoConfig(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
QFile file(mApp->currentProfilePath() + "proxy.pac");
|
QFile file(m_url.isLocalFile() ? m_url.path() : mApp->currentProfilePath() + "proxy.pac");
|
||||||
|
|
||||||
if (!file.open(QFile::ReadOnly)) {
|
if (!file.open(QFile::ReadOnly)) {
|
||||||
qWarning() << "PacManager: Cannot open PAC file for reading" << file.fileName();
|
qWarning() << "PacManager: Cannot open PAC file for reading" << file.fileName();
|
||||||
|
Loading…
Reference in New Issue
Block a user