fixed bug #719514 ' Themes: <file> and <otherfile> are the same file'

Fixes: https://launchpad.net/bugs/719514
This commit is contained in:
Tomas Groth 2014-06-15 22:35:31 +02:00
parent d61111ab89
commit 7a47e5cb67
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,7 @@ class ThemeManager(OpenLPMixin, RegistryMixin, QtGui.QWidget, Ui_ThemeManager, R
finally:
if out_file:
out_file.close()
if image_from and image_from != image_to:
if image_from and os.path.abspath(image_from) != os.path.abspath(image_to):
try:
encoding = get_filesystem_encoding()
shutil.copyfile(str(image_from).encode(encoding), str(image_to).encode(encoding))