[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.2/kdepim/kalarm/resources
From: David Jarvie <software () astrojar ! org ! uk>
Date: 2009-03-14 17:42:26
Message-ID: 1237052546.109845.20434.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 939350 by djarvie:
Ignore temporary and backup files when loading
M +7 -3 resourcelocaldir.cpp
--- branches/KDE/4.2/kdepim/kalarm/resources/resourcelocaldir.cpp #939349:939350
@@ -2,7 +2,7 @@
* resourcelocaldir.cpp - KAlarm local directory calendar resource
* Program: kalarm
* Copyright © 2006-2009 by David Jarvie <djarvie@kde.org>
- * Based on resourcelocaldir.cpp in libkcal (updated to rev 779953, 938673),
+ * Based on resourcelocaldir.cpp in libkcal (updated to rev 779953,938673,938806),
* Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
*
* This program is free software; you can redistribute it and/or modify
@@ -149,6 +149,9 @@
#ifdef __GNUC__
#warning Only reload the individual file which has changed
#endif
+ if (filepath.contains(QRegExp("(~|\\.new|\\.tmp)$"))
+ || filepath.startsWith(mURL.path() + "/qt_temp."))
+ return; // ignore backup or temporary file
doLoad(false);
}
/******************************************************************************
@@ -203,8 +206,9 @@
{
// Check the next file in the directory
QString id = entries[i];
- if (id.endsWith('~')) // backup file, ignore it
- continue;
+ if (id.contains(QRegExp("(~|\\.new|\\.tmp)$"))
+ || id.startsWith("qt_temp."))
+ continue; // ignore backup or temporary file
QString fileName = dirName + '/' + id;
foundFile = true;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic