Skip to content

Commit 0b5ad99

Browse files
keysmashesm3nu
andauthored
Fix exclusion handling for source size estimation (#2206)
* Avoid using comments as exclude patterns in FilePathInfoAsync * Use *all* exclusions when estimating source size --------- Co-authored-by: Manu <[email protected]>
1 parent d1e2639 commit 0b5ad99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/vorta/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, path, exclude_patterns_str):
4343
self.exclude_patterns = []
4444
for _line in (exclude_patterns_str or '').splitlines():
4545
line = _line.strip()
46-
if line != '':
46+
if line != '' and not line.startswith("#"):
4747
self.exclude_patterns.append(line)
4848

4949
def run(self):

src/vorta/views/source_tab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def update_path_info(self, index_row: int):
206206
path = self.sourceFilesWidget.item(index_row, SourceColumn.Path).text()
207207
self.sourceFilesWidget.item(index_row, SourceColumn.Size).setText(self.tr("Calculating…"))
208208
self.sourceFilesWidget.item(index_row, SourceColumn.FilesCount).setText(self.tr("Calculating…"))
209-
getDir = FilePathInfoAsync(path, self.profile().exclude_patterns)
209+
getDir = FilePathInfoAsync(path, self.profile().get_combined_exclusion_string())
210210
getDir.signal.connect(self.set_path_info)
211211
getDir.setObjectName(path)
212212
self.updateThreads.append(getDir) # this is ugly, is there a better way to keep the thread object?

0 commit comments

Comments
 (0)