Made a more sensible patch, using Luks suggestion. :)

This commit is contained in:
Carlin Mangar
2009-10-19 17:23:50 +11:00
committed by Lukáš Lalinský
parent 7090fbe211
commit 0cb228b876
2 changed files with 2 additions and 2 deletions

View File

@@ -236,7 +236,7 @@ class File(LockableObject, Item):
new_filename = new_filename.replace('/.', '/_').replace('\\.', '\\_')
if new_filename[0] == '.':
new_filename = '_' + new_filename[1:]
return os.path.join(new_dirname, new_filename + ext.lower())
return os.path.realpath(os.path.join(new_dirname, new_filename + ext.lower()))
def _rename(self, old_filename, metadata, settings):
new_filename, ext = os.path.splitext(

View File

@@ -305,7 +305,7 @@ class Tagger(QtGui.QApplication):
self.log.debug("Adding files %r", filenames)
new_files = []
for filename in filenames:
filename = os.path.normpath(filename)
filename = os.path.normpath(os.path.realpath(filename))
if filename not in self.files:
file = open_file(filename)
if file: