Renames some files to "None"
Bug #716309 reported by
Aston Clulow
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyRenamer |
New
|
Undecided
|
Unassigned |
Bug Description
When renaming images according to metadata, any image with no metadata (eg one that's been edited in GIMP) will be renamed to "None", rather than being skipped. I can't remember what happens if there's more than one image with no metadata, but I do remember it's not good!
To post a comment you must log in.
Not only when there is no metadata but also when the file name pattern does not match.
Solution:
Edit the pyrenamer_ filefuncs. py (at /usr/lib/ python2. 7/site- packages/ pyrenamer/ ), adding this two lines to the "def replace_ images( name, path, newname, newpath):" function:
---------- replace( '{cameramodel} ', cameramodel) replace( '{cameramodel} ', '')
if cameramodel != None: newname = newname.
else: newname = newname.
+ if newname == "None":
+ return None, None
# Returns new name and path path(newname, path)
newpath = get_new_
return unicode(newname), unicode(newpath)
----------
Recompile it: filefuncs. py
python2 -O pyrenamer_