1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

[#161 state:fixed] Fixed folder sorting.

This commit is contained in:
Virgil Dupras
2011-06-15 11:58:33 -04:00
parent cd9fd3a10b
commit 56207f4dbb
10 changed files with 46 additions and 33 deletions

View File

@@ -9,11 +9,11 @@
# data module for tests
from hscommon.util import format_size
from ..data import format_path, cmp_value, Column
from ..data import cmp_value, Column
COLUMNS = [
Column('name', 'Filename'),
Column('path', 'Directory'),
Column('folder_path', 'Directory'),
Column('size', 'Size (KB)'),
Column('extension', 'Kind'),
]
@@ -29,7 +29,7 @@ def GetDisplayInfo(dupe, group, delta):
size -= r.size
return [
dupe.name,
format_path(dupe.path),
str(dupe.folder_path),
format_size(size, 0, 1, False),
dupe.extension if hasattr(dupe, 'extension') else '---',
]

View File

@@ -26,6 +26,11 @@ class NamedObject(engine_test.NamedObject):
def __bool__(self):
return False #Make sure that operations are made correctly when the bool value of files is false.
@property
def folder_path(self):
return self.path[:-1]
# Returns a group set that looks like that:
# "foo bar" (1)