Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
3381362d
Commit
3381362d
authored
Jun 22, 2010
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix file rename in Windows
parent
1ba05503
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
contacts.py
blink/contacts.py
+6
-0
No files found.
blink/contacts.py
View file @
3381362d
...
...
@@ -8,6 +8,7 @@ __all__ = ['BonjourGroup', 'BonjourNeighbour', 'Contact', 'ContactGroup', 'Conta
import
cPickle
as
pickle
import
errno
import
os
import
sys
from
PyQt4
import
uic
from
PyQt4.QtCore
import
Qt
,
QAbstractListModel
,
QByteArray
,
QEvent
,
QMimeData
,
QModelIndex
,
QPointF
,
QRectF
,
QRegExp
,
QSize
,
QStringList
,
pyqtSignal
...
...
@@ -18,6 +19,7 @@ from application.notification import IObserver, NotificationCenter
from
application.python.decorator
import
decorator
,
preserve_signature
from
application.python.queue
import
EventQueue
from
application.python.util
import
Null
from
application.system
import
unlink
from
functools
import
partial
from
operator
import
attrgetter
from
zope.interface
import
implements
...
...
@@ -778,10 +780,14 @@ class ContactModel(QAbstractListModel):
file
.
write
(
data
)
file
.
close
()
try
:
if
sys
.
platform
==
'win32'
:
unlink
(
bak_filename
)
os
.
rename
(
filename
,
bak_filename
)
except
OSError
,
e
:
if
e
.
errno
!=
errno
.
ENOENT
:
raise
if
sys
.
platform
==
'win32'
:
unlink
(
filename
)
os
.
rename
(
tmp_filename
,
filename
)
@
updates_contacts_db
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment