Skip to content

Commit 199b21e

Browse files
committed
preview improvements, release
1 parent 7782a67 commit 199b21e

File tree

3 files changed

+129
-61
lines changed

3 files changed

+129
-61
lines changed

.github/workflows/run.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ jobs:
259259
tag_name: ${{ steps.version.outputs.version }}
260260
name: Dude ${{ steps.version.outputs.version }}
261261
draft: false
262-
prerelease: true
262+
prerelease: false
263263
files: |
264264
dude.${{ steps.version.outputs.version }}.linux.portable.zip
265265
dude.${{ steps.version.outputs.version }}.linux.nuitka.portable.zip

src/core.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ def delete_file_wrapper(self,size,crc,index_tuple_set,to_trash,file_callback,crc
13531353

13541354
def link_wrapper(self,\
13551355
kind,relative,size,crc,\
1356-
index_tuple_ref,index_tuple_list,to_trash,file_callback=None,crc_callback=None):
1356+
index_tuple_ref,index_tuple_list,to_trash,file_callback,crc_callback,similarity_mode=False):
13571357

13581358
l_info = self.log.info
13591359
delete_command = self.delete_file_to_trash if to_trash else self.delete_file
@@ -1363,25 +1363,31 @@ def link_wrapper(self,\
13631363
(path_nr_keep,path_keep,file_keep,ctime_keep,dev_keep,inode_keep)=index_tuple_ref
13641364

13651365
self_get_full_path_scanned = self.get_full_path_scanned
1366-
self_files_of_size_of_crc_size_crc = self.files_of_size_of_crc[size][crc]
1366+
#self_files_of_size_of_crc_size_crc = self.files_of_size_of_crc[size][crc]
1367+
1368+
if similarity_mode:
1369+
pool = self.files_of_images_groups[crc]
1370+
else:
1371+
pool = self.files_of_size_of_crc[size][crc]
1372+
13671373

13681374
self_rename_file = self.rename_file
13691375

13701376
full_file_path_keep=self_get_full_path_scanned(path_nr_keep,path_keep,file_keep)
13711377

13721378
link_command = (lambda p : self.do_soft_link(full_file_path_keep,p,relative,l_info)) if kind==SOFTLINK else (lambda p : self.do_win_lnk_link(full_file_path_keep,str(p) + ".lnk",l_info)) if kind==WIN_LNK else (lambda p : self.do_hard_link(full_file_path_keep,p,l_info))
13731379

1374-
if index_tuple_ref not in self_files_of_size_of_crc_size_crc:
1375-
return 'link_wrapper - Internal Data Inconsistency:%s / %s' % (full_file_path_keep,index_tuple_ref)
1380+
if index_tuple_ref not in pool:
1381+
return 'link_wrapper - Internal Data Inconsistency (1):%s / %s' % (full_file_path_keep,index_tuple_ref)
13761382

13771383
res=[]
13781384
tuples_to_remove = set()
13791385
for index_tuple in index_tuple_list:
13801386
(pathnr,path,file_name,ctime,dev,inode)=index_tuple
13811387
full_file_path=self_get_full_path_scanned(pathnr,path,file_name)
13821388

1383-
if index_tuple not in self_files_of_size_of_crc_size_crc:
1384-
res.append('link_wrapper - Internal Data Inconsistency:%s / %s' % (full_file_path,index_tuple))
1389+
if index_tuple not in pool:
1390+
res.append('link_wrapper - Internal Data Inconsistency (2):%s / %s' % (full_file_path,index_tuple))
13851391
break
13861392

13871393
temp_file='%s.dude_pre_delete_temp' % full_file_path

0 commit comments

Comments
 (0)