Version 67 DeleteOrphans improvement
This commit is contained in:
parent
328a014200
commit
5d8f93c759
|
@ -17,6 +17,7 @@
|
||||||
<li>subs and repos will automatically pause while their respective dialogs are open</li>
|
<li>subs and repos will automatically pause while their respective dialogs are open</li>
|
||||||
<li>new namespace | regex listctrl in regex dialog, instead of old sctvcp rubbish</li>
|
<li>new namespace | regex listctrl in regex dialog, instead of old sctvcp rubbish</li>
|
||||||
<li>new /aa/aa...0 file storage system for client</li>
|
<li>new /aa/aa...0 file storage system for client</li>
|
||||||
|
<li>fixed deleteorphans mime issue</li>
|
||||||
<li>export and copy files now export writeable files, not read-only</li>
|
<li>export and copy files now export writeable files, not read-only</li>
|
||||||
<li>rejiggered daemon db access, improving maintenance reliablity</li>
|
<li>rejiggered daemon db access, improving maintenance reliablity</li>
|
||||||
<li>dumper and 'show in new page' pages now process content updates correctly</li>
|
<li>dumper and 'show in new page' pages now process content updates correctly</li>
|
||||||
|
|
|
@ -1728,7 +1728,31 @@ class ServiceDB( FileDB, MessageDB, TagDB, RatingDB ):
|
||||||
|
|
||||||
for hash in local_files_hashes & deletee_hashes:
|
for hash in local_files_hashes & deletee_hashes:
|
||||||
|
|
||||||
with self._hashes_to_mimes_lock: mime = self._hashes_to_mimes[ hash ]
|
with self._hashes_to_mimes_lock:
|
||||||
|
|
||||||
|
# not sure why I'm ever getting a key error here, but let's recover from it anyway!
|
||||||
|
|
||||||
|
if hash in self._hashes_to_mimes: mime = self._hashes_to_mimes[ hash ]
|
||||||
|
else: mime = None
|
||||||
|
|
||||||
|
|
||||||
|
if mime is None:
|
||||||
|
|
||||||
|
for mime in HC.ALLOWED_MIMES:
|
||||||
|
|
||||||
|
path = CC.GetFilePath( hash, mime )
|
||||||
|
|
||||||
|
if os.path.exists( path ):
|
||||||
|
|
||||||
|
os.chmod( path, stat.S_IWRITE )
|
||||||
|
|
||||||
|
os.remove( path )
|
||||||
|
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
path = CC.GetFilePath( hash, mime )
|
path = CC.GetFilePath( hash, mime )
|
||||||
|
|
||||||
|
@ -1737,6 +1761,7 @@ class ServiceDB( FileDB, MessageDB, TagDB, RatingDB ):
|
||||||
os.remove( path )
|
os.remove( path )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# perceptual_hashes and thumbs
|
# perceptual_hashes and thumbs
|
||||||
|
|
||||||
perceptual_hash_ids = { hash_id for ( hash_id, ) in c.execute( 'SELECT hash_id FROM perceptual_hashes;' ) }
|
perceptual_hash_ids = { hash_id for ( hash_id, ) in c.execute( 'SELECT hash_id FROM perceptual_hashes;' ) }
|
||||||
|
|
Loading…
Reference in New Issue