summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2011-12-21 18:02:36 (GMT)
committerJohn (J5) Palmieri <johnp@redhat.com>2011-12-21 18:02:36 (GMT)
commit5e59ac53a061a078fde854877331d25c87cf7a31 (patch)
tree8b449e9f8212871700a1bf1bf912ddef0affae8c
parent1287961aab84a37e54ac07d08d946eaedca8392b (diff)
downloadfedoracommunity-5e59ac53a061a078fde854877331d25c87cf7a31.zip
fedoracommunity-5e59ac53a061a078fde854877331d25c87cf7a31.tar.gz
fedoracommunity-5e59ac53a061a078fde854877331d25c87cf7a31.tar.xz
correctly move icon files
* we aren't as pandantic about removing stale files as we are with the db files because they won't cause an issue like they would in xapian
-rwxr-xr-xbin/fcomm-index-packages8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/fcomm-index-packages b/bin/fcomm-index-packages
index 370b750..8214623 100755
--- a/bin/fcomm-index-packages
+++ b/bin/fcomm-index-packages
@@ -43,9 +43,11 @@ if __name__=="__main__":
icon_dir = os.path.join(options.cache_path, 'icons')
for file_name in os.listdir(icon_dir):
- file_path = os.path.join(icon_dir, file_name)
- if os.path.isdir(file_path) and not os.path.islink(file_path):
- shutil.move(file_path, options.icon_dest)
+ new_file_path = os.path.join(icon_dir, file_name)
+ old_file_path = os.path.join(options.index_db_dest, file_name)
+ if os.path.isfile(old_file_path):
+ os.remove(old_file_path)
+ shutil.move(new_file_path, options.icon_dest)
if options.index_db_dest is not None:
index_dir = os.path.join(options.cache_path, 'search')