mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kioslave: remove windows workaround from http slave
This commit is contained in:
parent
097df588bb
commit
ae9f79c80e
2 changed files with 2 additions and 22 deletions
|
@ -4978,26 +4978,6 @@ void HTTPProtocol::cacheFileClose()
|
|||
tempFile->write(header);
|
||||
|
||||
ccCommand = makeCacheCleanerCommand(m_request.cacheTag, CreateFileNotificationCommand);
|
||||
|
||||
QString oldName = tempFile->fileName();
|
||||
QString newName = oldName;
|
||||
int basenameStart = newName.lastIndexOf(QLatin1Char('/')) + 1;
|
||||
// remove the randomized name part added by QTemporaryFile
|
||||
newName.chop(newName.length() - basenameStart - s_hashedUrlNibbles);
|
||||
kDebug(7113) << "Renaming temporary file" << oldName << "to" << newName;
|
||||
|
||||
// on windows open files can't be renamed
|
||||
tempFile->setAutoRemove(false);
|
||||
delete tempFile;
|
||||
file = 0;
|
||||
|
||||
if (!QFile::rename(oldName, newName)) {
|
||||
// ### currently this hides a minor bug when force-reloading a resource. We
|
||||
// should not even open a new file for writing in that case.
|
||||
kDebug(7113) << "Renaming temporary file failed, deleting it instead.";
|
||||
QFile::remove(oldName);
|
||||
ccCommand.clear(); // we have nothing of value to tell the cache cleaner
|
||||
}
|
||||
} else {
|
||||
// oh, we've never written payload data to the cache file.
|
||||
// the temporary file is closed and removed and no proper cache entry is created.
|
||||
|
|
|
@ -85,8 +85,8 @@ KCookieServer::KCookieServer(QObject* parent, const QList<QVariant>&)
|
|||
mTimer->setSingleShot(true);
|
||||
connect(mTimer, SIGNAL(timeout()), SLOT(slotSave()));
|
||||
mConfig = new KConfig("kcookiejarrc");
|
||||
mCookieJar->loadConfig( mConfig );
|
||||
mCookieJar->loadCookies( KStandardDirs::locateLocal("data", "kcookiejar/cookies"));
|
||||
mCookieJar->loadConfig(mConfig);
|
||||
mCookieJar->loadCookies(KStandardDirs::locateLocal("data", "kcookiejar/cookies"));
|
||||
|
||||
connect(this, SIGNAL(windowUnregistered(qlonglong)),
|
||||
this, SLOT(slotDeleteSessionCookies(qlonglong)));
|
||||
|
|
Loading…
Add table
Reference in a new issue