Index: src/ch/CustomCopyDlg.cpp =================================================================== diff -u -r53e3a91f9bcb2e26f758fc92e9856a69eba71a61 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 53e3a91f9bcb2e26f758fc92e9856a69eba71a61) +++ src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -66,8 +66,7 @@ DDX_Check(pDX, IDC_ONLYSTRUCTURE_CHECK, m_bOnlyCreate); DDX_Check(pDX, IDC_IGNOREFOLDERS_CHECK, m_bIgnoreFolders); DDX_Check(pDX, IDC_FORCEDIRECTORIES_CHECK, m_bForceDirectories); - DDX_Check(pDX, IDC_FILTERS_CHECK, m_bFilters); - DDX_Check(pDX, IDC_ADVANCED_CHECK, m_bAdvanced); + DDX_Check(pDX, IDC_DONT_CREATE_EMPTY_DIRECTORIES_CHECK, m_bExcludeEmptyDirectories); } BEGIN_MESSAGE_MAP(CCustomCopyDlg, ictranslate::CLanguageDialog) @@ -79,15 +78,13 @@ ON_BN_CLICKED(IDC_ADDFILTER_BUTTON, OnAddfilterButton) ON_BN_CLICKED(IDC_REMOVEFILTER_BUTTON, OnRemovefilterButton) ON_WM_DESTROY() - ON_BN_CLICKED(IDC_FILTERS_CHECK, OnFiltersCheck) - ON_BN_CLICKED(IDC_STANDARD_CHECK, OnStandardCheck) - ON_BN_CLICKED(IDC_ADVANCED_CHECK, OnAdvancedCheck) ON_NOTIFY(NM_DBLCLK, IDC_FILTERS_LIST, OnDblclkFiltersList) ON_LBN_DBLCLK(IDC_BUFFERSIZES_LIST, OnDblclkBuffersizesList) ON_CBN_EDITCHANGE(IDC_DESTPATH_COMBOBOXEX, OnEditchangeDestpathComboboxex) ON_BN_CLICKED(IDC_IMPORT_BUTTON, OnImportButton) ON_BN_CLICKED(IDC_IGNOREFOLDERS_CHECK, OnIgnorefoldersCheck) ON_BN_CLICKED(IDC_FORCEDIRECTORIES_CHECK, OnForcedirectoriesCheck) + ON_BN_CLICKED(IDC_DONT_CREATE_EMPTY_DIRECTORIES_CHECK, OnExcludeEmptyDirectories) ON_BN_CLICKED(IDC_EXPORT_BUTTON, OnExportButtonClicked) ON_BN_CLICKED(IDC_CUSTOM_RULES_BUTTON, OnBnCustomRules) ON_WM_SIZE() @@ -103,51 +100,54 @@ HICON hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); SetIcon(hIcon, FALSE); - AddResizableControl(IDC_001_STATIC, 0.0, 0.0, 1.0, 0.0); + AddResizableControl(IDC_HDR_SOURCE_FILES_STATIC, 0.0, 0.0, 1.0, 0.0); AddResizableControl(IDC_FILES_LIST, 0.0, 0.0, 1.0, 0.5); AddResizableControl(IDC_ADDFILE_BUTTON, 1.0, 0.0, 0.0, 0.0); AddResizableControl(IDC_ADDDIR_BUTTON, 1.0, 0.0, 0.0, 0.0); AddResizableControl(IDC_REMOVEFILEFOLDER_BUTTON, 1.0, 0.0, 0.0, 0.0); AddResizableControl(IDC_IMPORT_BUTTON, 1.0, 0.0, 0.0, 0.0); - AddResizableControl(IDC_002_STATIC, 0.0, 0.5, 1.0, 0.0); + AddResizableControl(IDC_HDR_DESTIONATION_PATH_STATIC, 0.0, 0.5, 1.0, 0.0); AddResizableControl(IDC_DESTPATH_COMBOBOXEX, 0.0, 0.5, 1.0, 0.0); AddResizableControl(IDC_DESTBROWSE_BUTTON, 1.0, 0.5, 0.0, 0.0); - AddResizableControl(IDC_BAR1_STATIC, 0.0, 0.5, 0.5, 0.0); - AddResizableControl(IDC_007_STATIC, 0.5, 0.5, 0.0, 0.0); - AddResizableControl(IDC_BAR2_STATIC, 0.5, 0.5, 0.5, 0.0); + AddResizableControl(IDC_LEFT_STANDARD_OPTIONS_STATIC, 0.0, 0.5, 0.5, 0.0); + AddResizableControl(IDC_HDR_STANDARD_OPTIONS_STATIC, 0.5, 0.5, 0.0, 0.0); + AddResizableControl(IDC_RIGHT_STANDARD_OPTIONS_STATIC, 0.5, 0.5, 0.5, 0.0); - AddResizableControl(IDC_003_STATIC, 0.0, 0.5, 0.5, 0.0); - AddResizableControl(IDC_004_STATIC, 0.5, 0.5, 0.5, 0.0); + AddResizableControl(IDC_HDR_OPERATION_TYPE_STATIC, 0.0, 0.5, 0.5, 0.0); + AddResizableControl(IDC_HDR_PRIORITY_STATIC, 0.5, 0.5, 0.5, 0.0); AddResizableControl(IDC_OPERATION_COMBO, 0.0, 0.5, 0.5, 0.0); AddResizableControl(IDC_PRIORITY_COMBO, 0.5, 0.5, 0.5, 0.0); - AddResizableControl(IDC_006_STATIC, 0.0, 0.5, 1.0, 0.0); + AddResizableControl(IDC_HDR_BUFFER_SIZES_STATIC, 0.0, 0.5, 1.0, 0.0); AddResizableControl(IDC_BUFFERSIZES_LIST, 0.0, 0.5, 1.0, 0.0); AddResizableControl(IDC_BUFFERSIZES_BUTTON, 1.0, 0.5, 0.0, 0.0); - AddResizableControl(IDC_FILTERS_CHECK, 0.0, 0.5, 0.0, 0.0); - AddResizableControl(IDC_BAR3_STATIC, 0.0, 0.5, 1.0, 0.0); + AddResizableControl(IDC_LEFT_FILTERS_STATIC, 0.0, 0.5, 0.0, 0.0); + AddResizableControl(IDC_HDR_FILTERS_STATIC, 0.0, 0.5, 0.0, 0.0); + AddResizableControl(IDC_RIGHT_FILTERS_STATIC, 0.0, 0.5, 1.0, 0.0); AddResizableControl(IDC_FILTERS_LIST, 0.0, 0.5, 1.0, 0.5); AddResizableControl(IDC_ADDFILTER_BUTTON, 1.0, 0.5, 0.0, 0.0); AddResizableControl(IDC_REMOVEFILTER_BUTTON, 1.0, 0.5, 0.0, 0.0); - AddResizableControl(IDC_BAR7_STATIC, 0.0, 1.0, 0.0, 0.0); - AddResizableControl(IDC_FEEDBACK_RULES_STATIC, 0.0, 1.0, 0.0, 0.0); - AddResizableControl(IDC_BAR8_STATIC, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_LEFT_FEEDBACK_RULES_STATIC, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_HDR_FEEDBACK_RULES_STATIC, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_RIGHT_FEEDBACK_RULES_STATIC, 0.0, 1.0, 1.0, 0.0); AddResizableControl(IDC_FEEDBACK_RULES_SUMMARY_EDIT, 0.0, 1.0, 1.0, 0.0); AddResizableControl(IDC_CUSTOM_RULES_BUTTON, 1.0, 1.0, 0.0, 0.0); - AddResizableControl(IDC_ADVANCED_CHECK, 0.0, 1.0, 0.0, 0.0); - AddResizableControl(IDC_BAR4_STATIC, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_LEFT_ADVANCED_OPTIONS_STATIC, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_HDR_ADVANCED_OPTIONS_STATIC, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_RIGHT_ADVANCED_OPTIONS_STATIC, 0.0, 1.0, 1.0, 0.0); AddResizableControl(IDC_IGNOREFOLDERS_CHECK, 0.0, 1.0, 1.0, 0.0); AddResizableControl(IDC_ONLYSTRUCTURE_CHECK, 0.0, 1.0, 1.0, 0.0); AddResizableControl(IDC_FORCEDIRECTORIES_CHECK, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_DONT_CREATE_EMPTY_DIRECTORIES_CHECK, 0.0, 1.0, 1.0, 0.0); - AddResizableControl(IDC_BAR5_STATIC, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_BOTTOM_BAR_STATIC, 0.0, 1.0, 1.0, 0.0); AddResizableControl(IDOK, 1.0, 1.0, 0.0, 0.0); AddResizableControl(IDCANCEL, 1.0, 1.0, 0.0, 0.0); AddResizableControl(IDC_EXPORT_BUTTON, 0.0, 1.0, 0.0, 0.0); @@ -278,13 +278,11 @@ lvc.cx=static_cast(0.1*rc.Width()); m_ctlFilters.InsertColumn(6, &lvc); - m_bFilters = !m_tTaskDefinition.GetFilters().IsEmpty(); - // other custom flags m_bIgnoreFolders = chengine::GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); m_bForceDirectories = chengine::GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); + m_bExcludeEmptyDirectories = chengine::GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); m_bOnlyCreate = chengine::GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); - m_bAdvanced = (m_bIgnoreFolders | m_bForceDirectories | m_bOnlyCreate); UpdateData(FALSE); @@ -725,30 +723,11 @@ { UpdateData(TRUE); - m_ctlFilters.EnableWindow(m_bFilters); - GetDlgItem(IDC_ADDFILTER_BUTTON)->EnableWindow(m_bFilters); - GetDlgItem(IDC_REMOVEFILTER_BUTTON)->EnableWindow(m_bFilters); - - GetDlgItem(IDC_IGNOREFOLDERS_CHECK)->EnableWindow(m_bAdvanced && !m_bForceDirectories); - GetDlgItem(IDC_FORCEDIRECTORIES_CHECK)->EnableWindow(m_bAdvanced && !m_bIgnoreFolders); - GetDlgItem(IDC_ONLYSTRUCTURE_CHECK)->EnableWindow(m_bAdvanced); + GetDlgItem(IDC_IGNOREFOLDERS_CHECK)->EnableWindow(!m_bForceDirectories && !m_bExcludeEmptyDirectories); + GetDlgItem(IDC_FORCEDIRECTORIES_CHECK)->EnableWindow(!m_bIgnoreFolders); + GetDlgItem(IDC_DONT_CREATE_EMPTY_DIRECTORIES_CHECK)->EnableWindow(!m_bIgnoreFolders); } -void CCustomCopyDlg::OnFiltersCheck() -{ - EnableControls(); -} - -void CCustomCopyDlg::OnStandardCheck() -{ - EnableControls(); -} - -void CCustomCopyDlg::OnAdvancedCheck() -{ - EnableControls(); -} - void CCustomCopyDlg::OnDblclkFiltersList(NMHDR* /*pNMHDR*/, LRESULT* pResult) { POSITION pos = m_ctlFilters.GetFirstSelectedItemPosition(); @@ -947,13 +926,38 @@ UpdateData(TRUE); GetDlgItem(IDC_IGNOREFOLDERS_CHECK)->EnableWindow(!m_bForceDirectories); + if(m_bForceDirectories) + { + m_bIgnoreFolders = FALSE; + UpdateData(FALSE); + } } +void CCustomCopyDlg::OnExcludeEmptyDirectories() +{ + UpdateData(TRUE); + + GetDlgItem(IDC_IGNOREFOLDERS_CHECK)->EnableWindow(!m_bExcludeEmptyDirectories); + if(m_bExcludeEmptyDirectories) + { + m_bIgnoreFolders = FALSE; + UpdateData(FALSE); + } +} + void CCustomCopyDlg::OnIgnorefoldersCheck() { UpdateData(TRUE); GetDlgItem(IDC_FORCEDIRECTORIES_CHECK)->EnableWindow(!m_bIgnoreFolders); + GetDlgItem(IDC_DONT_CREATE_EMPTY_DIRECTORIES_CHECK)->EnableWindow(!m_bIgnoreFolders); + + if(m_bIgnoreFolders) + { + m_bForceDirectories = FALSE; + m_bExcludeEmptyDirectories = FALSE; + UpdateData(FALSE); + } } void CCustomCopyDlg::OnExportButtonClicked() @@ -1020,6 +1024,7 @@ chengine::SetTaskPropValue(m_tTaskDefinition.GetConfiguration(), (m_bIgnoreFolders != 0)); chengine::SetTaskPropValue(m_tTaskDefinition.GetConfiguration(), (m_bForceDirectories != 0)); chengine::SetTaskPropValue(m_tTaskDefinition.GetConfiguration(), (m_bOnlyCreate != 0)); + chengine::SetTaskPropValue(m_tTaskDefinition.GetConfiguration(), (m_bExcludeEmptyDirectories != 0)); } bool CCustomCopyDlg::HasBasicTaskData() Index: src/ch/CustomCopyDlg.h =================================================================== diff -u -r53e3a91f9bcb2e26f758fc92e9856a69eba71a61 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision 53e3a91f9bcb2e26f758fc92e9856a69eba71a61) +++ src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -64,15 +64,13 @@ afx_msg void OnAddfilterButton(); afx_msg void OnRemovefilterButton(); afx_msg void OnDestroy(); - afx_msg void OnFiltersCheck(); - afx_msg void OnStandardCheck(); - afx_msg void OnAdvancedCheck(); afx_msg void OnDblclkFiltersList(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnDblclkBuffersizesList(); afx_msg void OnEditchangeDestpathComboboxex(); afx_msg void OnImportButton(); afx_msg void OnIgnorefoldersCheck(); afx_msg void OnForcedirectoriesCheck(); + afx_msg void OnExcludeEmptyDirectories(); afx_msg void OnExportButtonClicked(); afx_msg void OnBnCustomRules(); afx_msg void OnSize(UINT nType, int cx, int cy); @@ -97,6 +95,5 @@ BOOL m_bOnlyCreate = FALSE; BOOL m_bIgnoreFolders = FALSE; BOOL m_bForceDirectories = FALSE; - BOOL m_bFilters = FALSE; - BOOL m_bAdvanced = FALSE; + BOOL m_bExcludeEmptyDirectories = FALSE; }; Index: src/ch/FilterTypesMenuWrapper.cpp =================================================================== diff -u -r63369021254e8b67ffeef5a9ece1b5a70df881c4 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/ch/FilterTypesMenuWrapper.cpp (.../FilterTypesMenuWrapper.cpp) (revision 63369021254e8b67ffeef5a9ece1b5a70df881c4) +++ src/ch/FilterTypesMenuWrapper.cpp (.../FilterTypesMenuWrapper.cpp) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -72,7 +72,7 @@ CString strFmt; strFmt.Format(L"%S", (PCSTR)strMsg); - ictranslate::CFormat fmt(GetResManager().LoadString(IDS_INVALID_FILTER)); + ictranslate::CFormat fmt(GetResManager().LoadString(IDS_INVALID_FILTER_STRING)); fmt.SetParam(_T("%err"), strFmt); AfxMessageBox(fmt.ToString()); return false; Index: src/ch/StatusDlg.cpp =================================================================== diff -u -rdb26c9ac6945d5c754c3460dd55bd6d53e2c9e7e -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision db26c9ac6945d5c754c3460dd55bd6d53e2c9e7e) +++ src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -1044,6 +1044,11 @@ strStatusText += _T("/"); strStatusText += GetResManager().LoadString(IDS_STATUS_WITHOUT_CONTENTS_STRING); } + if(spTaskStats->GetExcludeEmptyDirectories()) + { + strStatusText += _T("/"); + strStatusText += GetResManager().LoadString(IDS_STATUS_EXCLUDE_EMPTY_DIRECTORIES_STRING); + } return strStatusText; } Index: src/ch/ch.rc =================================================================== diff -u -r63369021254e8b67ffeef5a9ece1b5a70df881c4 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/ch/ch.rc (.../ch.rc) (revision 63369021254e8b67ffeef5a9ece1b5a70df881c4) +++ src/ch/ch.rc (.../ch.rc) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -225,7 +225,7 @@ CONTROL "Progress1",IDC_TIME_PROGRESS,"msctls_progress32",PBS_SMOOTH,7,48,172,9 END -IDD_CUSTOM_COPY_DIALOG DIALOGEX 0, 0, 351, 349 +IDD_CUSTOM_COPY_DIALOG DIALOGEX 0, 0, 351, 368 STYLE DS_SETFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW CAPTION "Copying/moving parameters" @@ -242,36 +242,40 @@ COMBOBOX IDC_PRIORITY_COMBO,181,124,159,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LISTBOX IDC_BUFFERSIZES_LIST,13,152,275,20,LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Change...",IDC_BUFFERSIZES_BUTTON,294,152,50,14 - CONTROL "Filtering",IDC_FILTERS_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,177,61,10 CONTROL "List2",IDC_FILTERS_LIST,"SysListView32",LVS_REPORT | WS_BORDER | WS_TABSTOP,13,190,303,46 PUSHBUTTON "+",IDC_ADDFILTER_BUTTON,322,190,22,14 PUSHBUTTON "-",IDC_REMOVEFILTER_BUTTON,322,206,22,14 CONTROL "Custom rules...",IDC_CUSTOM_RULES_BUTTON,"MfcButton",WS_TABSTOP,273,254,71,14 - CONTROL "Advanced options",IDC_ADVANCED_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,273,84,10 CONTROL "Do not create destination directories - copy files loosely to destination folder",IDC_IGNOREFOLDERS_CHECK, - "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,286,329,10 + "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,286,331,10 CONTROL "Create directory structure in destination folder (relatively to root directory)",IDC_FORCEDIRECTORIES_CHECK, - "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,297,329,10 + "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,298,331,10 CONTROL "Do not copy/move contents of files - only create it (empty)",IDC_ONLYSTRUCTURE_CHECK, - "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,308,329,10 - PUSHBUTTON "&Export...",IDC_EXPORT_BUTTON,7,328,50,14 - PUSHBUTTON "&OK",IDOK,239,328,50,14 - PUSHBUTTON "&Cancel",IDCANCEL,294,328,50,14 - LTEXT "Source files/folders:",IDC_001_STATIC,7,7,337,8 - LTEXT "Destination folder:",IDC_002_STATIC,7,76,337,8 - LTEXT "Operation type:",IDC_003_STATIC,13,115,117,8 - LTEXT "Priority:",IDC_004_STATIC,181,115,120,8 - LTEXT "Buffer sizes:",IDC_006_STATIC,13,142,244,8 - CONTROL "",IDC_BAR3_STATIC,"Static",SS_ETCHEDHORZ,76,181,268,1 - CONTROL "",IDC_BAR4_STATIC,"Static",SS_ETCHEDHORZ,98,278,246,1 - CONTROL "",IDC_BAR5_STATIC,"Static",SS_ETCHEDHORZ,7,322,337,1 - CONTROL "",IDC_BAR2_STATIC,"Static",SS_ETCHEDHORZ,107,107,237,1 - CTEXT "Standard options",IDC_007_STATIC,20,104,80,8 - CONTROL "",IDC_BAR1_STATIC,"Static",SS_ETCHEDHORZ,7,107,8,1 - CONTROL "",IDC_BAR8_STATIC,"Static",SS_ETCHEDHORZ,108,244,236,1 - CTEXT "Feedback rules",IDC_FEEDBACK_RULES_STATIC,21,241,80,8 - CONTROL "",IDC_BAR7_STATIC,"Static",SS_ETCHEDHORZ,8,244,7,1 + "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,310,331,10 + CONTROL "Do not create empty directories",IDC_DONT_CREATE_EMPTY_DIRECTORIES_CHECK, + "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,322,331,10 + PUSHBUTTON "&Export...",IDC_EXPORT_BUTTON,7,346,50,14 + PUSHBUTTON "&OK",IDOK,239,346,50,14 + PUSHBUTTON "&Cancel",IDCANCEL,294,346,50,14 + LTEXT "Source files/directories:",IDC_HDR_SOURCE_FILES_STATIC,7,7,337,8 + LTEXT "Destination folder:",IDC_HDR_DESTIONATION_PATH_STATIC,7,76,337,8 + LTEXT "Operation type:",IDC_HDR_OPERATION_TYPE_STATIC,13,115,117,8 + LTEXT "Priority:",IDC_HDR_PRIORITY_STATIC,181,115,120,8 + LTEXT "Buffer sizes:",IDC_HDR_BUFFER_SIZES_STATIC,13,142,244,8 + CONTROL "",IDC_BOTTOM_BAR_STATIC,"Static",SS_ETCHEDHORZ,7,340,336,1 + CONTROL "",IDC_RIGHT_STANDARD_OPTIONS_STATIC,"Static",SS_ETCHEDHORZ,107,107,237,1 + CTEXT "Standard options",IDC_HDR_STANDARD_OPTIONS_STATIC,20,104,80,8 + CONTROL "",IDC_LEFT_STANDARD_OPTIONS_STATIC,"Static",SS_ETCHEDHORZ,7,107,8,1 EDITTEXT IDC_FEEDBACK_RULES_SUMMARY_EDIT,13,254,255,14,ES_AUTOHSCROLL | WS_DISABLED + CONTROL "",IDC_LEFT_FEEDBACK_RULES_STATIC,"Static",SS_ETCHEDHORZ,8,244,7,1 + CONTROL "",IDC_RIGHT_FEEDBACK_RULES_STATIC,"Static",SS_ETCHEDHORZ,108,244,236,1 + CTEXT "Feedback rules",IDC_HDR_FEEDBACK_RULES_STATIC,21,241,80,8 + CONTROL "",IDC_RIGHT_ADVANCED_OPTIONS_STATIC,"Static",SS_ETCHEDHORZ,109,276,235,1 + CTEXT "Advanced options",IDC_HDR_ADVANCED_OPTIONS_STATIC,22,273,80,8 + CONTROL "",IDC_LEFT_ADVANCED_OPTIONS_STATIC,"Static",SS_ETCHEDHORZ,9,276,6,1 + CONTROL "",IDC_LEFT_FILTERS_STATIC,"Static",SS_ETCHEDHORZ,7,180,6,1 + CONTROL "",IDC_RIGHT_FILTERS_STATIC,"Static",SS_ETCHEDHORZ,107,180,235,1 + CTEXT "Filters",IDC_HDR_FILTERS_STATIC,20,177,80,8 END IDD_FILTER_DIALOG DIALOGEX 0, 0, 291, 267 @@ -280,10 +284,10 @@ FONT 8, "Tahoma", 0, 0, 0x1 BEGIN CONTROL "Include files matching:",IDC_FILTER_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,277,10 - COMBOBOX IDC_FILTER_COMBO,15,19,249,98,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FILTER_COMBO,15,19,249,98,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "...",IDC_INCLUDE_MASK_BUTTON,"MfcButton",WS_TABSTOP,267,19,17,12 CONTROL "Exclude files matching:",IDC_EXCLUDEMASK_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,35,277,10 - COMBOBOX IDC_FILTEREXCLUDE_COMBO,15,48,249,170,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_FILTEREXCLUDE_COMBO,15,48,249,170,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "...",IDC_EXCLUDE_MASK_BUTTON,"MfcButton",WS_TABSTOP,267,48,17,12 CONTROL "Filtering by size",IDC_SIZE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,66,277,10 COMBOBOX IDC_SIZETYPE1_COMBO,63,81,34,140,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -451,9 +455,9 @@ FONT 8, "Tahoma", 0, 0, 0x1 BEGIN CONTROL "Include files matching:",IDC_INCLUDE_MASK_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,23,277,10 - COMBOBOX IDC_INCLUDE_MASK_COMBO,15,35,250,98,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_INCLUDE_MASK_COMBO,15,35,250,98,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "Exclude files matching:",IDC_EXCLUDE_MASK_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,51,277,10 - COMBOBOX IDC_EXCLUDE_MASK_COMBO,15,64,250,170,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_EXCLUDE_MASK_COMBO,15,64,250,170,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "Filtering by size",IDC_FILTER_BY_SIZE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,82,277,10 COMBOBOX IDC_FILTER_BY_SIZE_COMBO,122,95,50,135,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Filtering by modification date",IDC_FILTER_BY_DATE_CHECK, @@ -480,9 +484,9 @@ BEGIN CONTROL "Include mask (separate by vertical lines ie. *.jpg|*.gif)",IDC_INCLUDE_MASK_CHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,23,277,10 - COMBOBOX IDC_INCLUDE_MASK_COMBO,15,35,250,98,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_INCLUDE_MASK_COMBO,15,35,250,98,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "Exclude mask",IDC_EXCLUDE_MASK_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,51,277,10 - COMBOBOX IDC_EXCLUDE_MASK_COMBO,15,64,250,170,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_EXCLUDE_MASK_COMBO,15,64,250,170,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "Filtering by operation",IDC_FILTER_BY_OPERATION_CHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,82,277,10 COMBOBOX IDC_FILTER_BY_OPERATION_COMBO,15,96,269,135,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -506,9 +510,9 @@ BEGIN CONTROL "Include mask (separate by vertical lines ie. *.jpg|*.gif)",IDC_INCLUDE_MASK_CHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,23,277,10 - COMBOBOX IDC_INCLUDE_MASK_COMBO,15,35,250,98,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_INCLUDE_MASK_COMBO,15,35,250,98,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP CONTROL "Exclude mask",IDC_EXCLUDE_MASK_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,51,277,10 - COMBOBOX IDC_EXCLUDE_MASK_COMBO,15,64,250,170,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_EXCLUDE_MASK_COMBO,15,64,250,170,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP DEFPUSHBUTTON "&OK",IDOK,179,135,50,14 PUSHBUTTON "&Cancel",IDCANCEL,234,135,50,14 CONTROL "",IDC_BOTTOM_BAR_STATIC,"Static",SS_ETCHEDHORZ,7,128,274,1 @@ -629,7 +633,7 @@ LEFTMARGIN, 7 RIGHTMARGIN, 344 TOPMARGIN, 7 - BOTTOMMARGIN, 342 + BOTTOMMARGIN, 361 END IDD_FILTER_DIALOG, DIALOG @@ -1884,7 +1888,8 @@ IDS_STATUS_LOADERROR_STRING "Load error" IDS_EXPORTING_TASK_FAILED "Exporting task data failed. Reason: %reason." IDS_LOGFILEEMPTY_STRING "Log file is empty" - IDS_INVALID_FILTER "Invalid filter:\n%err" + IDS_INVALID_FILTER_STRING "Invalid filter:\n%err" + IDS_STATUS_EXCLUDE_EMPTY_DIRECTORIES_STRING "Exclude empty directories" END STRINGTABLE @@ -2003,15 +2008,15 @@ BEGIN IDS_BSECD_STRING "CD: %size" IDS_BSELAN_STRING "LAN: %size" - IDS_HDRMASK_STRING "Include mask" + IDS_HDRMASK_STRING "Include" IDS_HDRSIZE_STRING "Size" IDS_HDRDATE_STRING "Date" IDS_HDRATTRIB_STRING "Attributes included" IDS_AND_STRING " and " IDS_FILTERMASKEMPTY_STRING "none" IDS_FILTERSIZE_STRING "any" IDS_FILTERDATE_STRING "any" - IDS_HDREXCLUDEMASK_STRING "Exclude mask" + IDS_HDREXCLUDEMASK_STRING "Exclude" IDS_HDREXCLUDEATTRIB_STRING "Attributes excluded" IDS_FILTERATTRIB_STRING "none" IDS_EMPTYFILTER_STRING "None of filtering options were selected" Index: src/ch/resource.h =================================================================== diff -u -r63369021254e8b67ffeef5a9ece1b5a70df881c4 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/ch/resource.h (.../resource.h) (revision 63369021254e8b67ffeef5a9ece1b5a70df881c4) +++ src/ch/resource.h (.../resource.h) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -94,6 +94,7 @@ #define IDC_TASK_ADVANCED_BUTTON 1017 #define IDC_PAUSE_BUTTON 1018 #define IDC_STANDARD_CHECK 1019 +#define IDC_DONT_CREATE_EMPTY_DIRECTORIES_CHECK 1019 #define IDC_FORCEDIRECTORIES_CHECK 1020 #define IDC_PAUSE_BUTTON2 1020 #define IDC_RESUME_BUTTON 1021 @@ -272,9 +273,12 @@ #define IDC_008_STATIC 1226 #define IDC_SUBTASKCOUNT_LABEL_STATIC 1226 #define IDC_FEEDBACK_RULES_STATIC 1226 +#define IDC_HDR_FEEDBACK_RULES_STATIC 1226 #define IDC_009_STATIC 1227 #define IDC_CURRENTOBJECT_LABEL_STATIC 1227 +#define IDC_HDR_ADVANCED_OPTIONS_STATIC 1227 #define IDC_010_STATIC 1228 +#define IDC_HDR_FILTERS_STATIC 1228 #define IDC_011_STATIC 1229 #define IDC_TASKPROCESSED_LABEL_STATIC 1229 #define IDC_012_STATIC 1230 @@ -317,14 +321,22 @@ #define IDC_029_STATIC 1247 #define IDC_030_STATIC 1248 #define IDC_BAR1_STATIC 1249 +#define IDC_LEFT_STANDARD_OPTIONS_STATIC 1249 #define IDC_BAR2_STATIC 1250 +#define IDC_RIGHT_STANDARD_OPTIONS_STATIC 1250 #define IDC_BAR3_STATIC 1251 #define IDC_BAR4_STATIC 1252 #define IDC_BAR5_STATIC 1253 #define IDC_HEADER_STATIC 1254 #define IDC_BAR8_STATIC 1254 +#define IDC_RIGHT_FEEDBACK_RULES_STATIC 1254 #define IDC_HOSTLINK_STATIC 1255 #define IDC_BAR7_STATIC 1255 +#define IDC_LEFT_FEEDBACK_RULES_STATIC 1255 +#define IDC_LEFT_FILTERS_STATIC 1256 +#define IDC_LEFT_ADVANCED_OPTIONS_STATIC 1257 +#define IDC_RIGHT_ADVANCED_OPTIONS_STATIC 1258 +#define IDC_RIGHT_FILTERS_STATIC 1259 #define IDC_PROGRAM_STATICEX 1263 #define IDC_FULLVERSION_STATICEX 1264 #define IDC_HOMEPAGE_STATICEX 1265 @@ -464,6 +476,12 @@ #define IDC_FEEDBACK_RULES_SUMMARY_EDIT 1431 #define IDC_INCLUDE_MASK_BUTTON 1443 #define IDC_EXCLUDE_MASK_BUTTON 1444 +#define IDC_HDR_STANDARD_OPTIONS_STATIC 1445 +#define IDC_HDR_SOURCE_FILES_STATIC 1446 +#define IDC_HDR_DESTIONATION_PATH_STATIC 1447 +#define IDC_HDR_OPERATION_TYPE_STATIC 1448 +#define IDC_HDR_PRIORITY_STATIC 1449 +#define IDC_HDR_BUFFER_SIZES_STATIC 1450 #define IDS_APPNAME_STRING 5000 #define IDS_PRIORITY0_STRING 5001 #define IDS_PRIORITY1_STRING 5002 @@ -804,7 +822,8 @@ #define IDS_STATUS_LOADERROR_STRING 21555 #define IDS_EXPORTING_TASK_FAILED 21556 #define IDS_LOGFILEEMPTY_STRING 21558 -#define IDS_INVALID_FILTER 21559 +#define IDS_INVALID_FILTER_STRING 21559 +#define IDS_STATUS_EXCLUDE_EMPTY_DIRECTORIES_STRING 21560 #define ID_POPUP_SHOW_STATUS 32773 #define ID_POPUP_TIME_CRITICAL 32774 #define ID_POPUP_HIGHEST 32775 @@ -849,7 +868,7 @@ #define ID_POPUP_FILTER_PATH_WILDCARD_EXAMPLE 32845 #define ID_POPUP_FILTER_FILE_REGEX_EXAMPLE 32846 #define ID_POPUP_FILTER_PATH_REGEX_EXAMPLE 32847 -#define ID_POPUP_FILTER_SEPARATOR_CHAR 32848 +#define ID_POPUP_FILTER_SEPARATOR_CHAR 32848 // Next default values for new objects // @@ -858,7 +877,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 246 #define _APS_NEXT_COMMAND_VALUE 32849 -#define _APS_NEXT_CONTROL_VALUE 1444 +#define _APS_NEXT_CONTROL_VALUE 1451 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif Index: src/libchengine/TFileFiltersArray.cpp =================================================================== diff -u -rf3c80778cfee0736195e00274c78040f7908ac5b -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TFileFiltersArray.cpp (.../TFileFiltersArray.cpp) (revision f3c80778cfee0736195e00274c78040f7908ac5b) +++ src/libchengine/TFileFiltersArray.cpp (.../TFileFiltersArray.cpp) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -34,9 +34,9 @@ return true; // if only one of the filters matches - return true - for(std::vector::const_iterator iterFilter = m_vEntries.begin(); iterFilter != m_vEntries.end(); ++iterFilter) + for(const auto& entry : m_vEntries) { - if((*iterFilter).Match(spInfo)) + if(entry.Match(spInfo)) return true; } Index: src/libchengine/TFileInfo.h =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TFileInfo.h (.../TFileInfo.h) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/TFileInfo.h (.../TFileInfo.h) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -107,6 +107,7 @@ void Load(const serializer::ISerializerRowReaderPtr& spRowReader, const TBasePathDataContainerPtr& spSrcContainer); void MarkAsAdded() { m_setModifications[eMod_Added] = true; } + bool IsAdded() const { return m_setModifications[eMod_Added]; } private: enum EModifications Index: src/libchengine/TFileInfoArray.cpp =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TFileInfoArray.cpp (.../TFileInfoArray.cpp) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/TFileInfoArray.cpp (.../TFileInfoArray.cpp) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -51,6 +51,18 @@ m_vFiles.push_back(spFileInfo); } + void TFileInfoArray::RemoveLast() + { + boost::unique_lock lock(m_lock); + if(!m_vFiles.empty()) + { + TFileInfoPtr spFileInfo = m_vFiles.back(); + m_vFiles.pop_back(); + if(!spFileInfo->IsAdded()) + m_setRemovedObjects.Add(spFileInfo->GetObjectID()); + } + } + file_count_t TFileInfoArray::GetCount() const { boost::shared_lock lock(m_lock); @@ -73,7 +85,8 @@ m_bComplete = false; for(const TFileInfoPtr& spFileInfo : m_vFiles) { - m_setRemovedObjects.Add(spFileInfo->GetObjectID()); + if(!spFileInfo->IsAdded()) + m_setRemovedObjects.Add(spFileInfo->GetObjectID()); } m_vFiles.clear(); } Index: src/libchengine/TFileInfoArray.h =================================================================== diff -u -r85b07e753393f661f7d8f528e4238ebb6e9e1204 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TFileInfoArray.h (.../TFileInfoArray.h) (revision 85b07e753393f661f7d8f528e4238ebb6e9e1204) +++ src/libchengine/TFileInfoArray.h (.../TFileInfoArray.h) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -39,6 +39,7 @@ // Adds a new object info to this container void Add(const TFileInfoPtr& spFileInfo); + void RemoveLast(); /// Retrieves count of elements in this object file_count_t GetCount() const; Index: src/libchengine/TSubTaskScanDirectory.cpp =================================================================== diff -u -r20c1b142537a6a4a2a88b7ef722c65c374ece35f -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision 20c1b142537a6a4a2a88b7ef722c65c374ece35f) +++ src/libchengine/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -119,6 +119,7 @@ bool bIgnoreDirs = GetTaskPropValue(rConfig); bool bForceDirectories = GetTaskPropValue(rConfig); + bool bExcludeEmptyDirectories = GetTaskPropValue(rConfig); // add everything TString strFormat; @@ -176,7 +177,7 @@ strFormat.Replace(_T("%path"), spFileInfo->GetFullFilePath().ToString()); LOG_INFO(m_spLog) << strFormat.c_str(); - ScanDirectory(spFileInfo->GetFullFilePath(), spBasePath, true, !bIgnoreDirs || bForceDirectories, rafFilters); + ScanDirectory(spFileInfo->GetFullFilePath(), spBasePath, !bIgnoreDirs || bForceDirectories, rafFilters, bExcludeEmptyDirectories); // check for kill need if (rThreadController.KillRequested()) @@ -218,8 +219,8 @@ m_tSubTaskStats.GetSnapshot(spStats); } - int TSubTaskScanDirectories::ScanDirectory(TSmartPath pathDirName, const TBasePathDataPtr& spBasePathData, - bool bRecurse, bool bIncludeDirs, const TFileFiltersArray& afFilters) + size_t TSubTaskScanDirectories::ScanDirectory(TSmartPath pathDirName, const TBasePathDataPtr& spBasePathData, + bool bIncludeDirs, const TFileFiltersArray& afFilters, bool bExcludeEmptyDirs) { TFileInfoArray& rFilesCache = GetContext().GetFilesCache(); TWorkerThreadController& rThreadController = GetContext().GetThreadController(); @@ -229,37 +230,46 @@ IFilesystemFindPtr spFinder = spFilesystem->CreateFinderObject(pathDirName, PathFromString(_T("*"))); TFileInfoPtr spFileInfo(std::make_shared()); + size_t stFilesCount = 0; while (spFinder->FindNext(spFileInfo)) { if (rThreadController.KillRequested()) break; - if (!spFileInfo->IsDirectory()) + if (spFileInfo->IsDirectory()) { - if (afFilters.Match(spFileInfo)) + TSmartPath pathCurrent = spFileInfo->GetFullFilePath(); + if(bIncludeDirs) { spFileInfo->SetParentObject(spBasePathData); rFilesCache.Add(spFileInfo); spFileInfo = std::make_shared(); } + + size_t stInnerFilesCount = ScanDirectory(pathCurrent, spBasePathData, bIncludeDirs, afFilters, bExcludeEmptyDirs); + if(bExcludeEmptyDirs && stInnerFilesCount == 0) + { + // if we want to exclude empty directories, now's a good time to get rid of freshly added directory + rFilesCache.RemoveLast(); + } + stFilesCount += stInnerFilesCount; } else { - TSmartPath pathCurrent = spFileInfo->GetFullFilePath(); - if (bIncludeDirs) + if (afFilters.Match(spFileInfo)) { spFileInfo->SetParentObject(spBasePathData); rFilesCache.Add(spFileInfo); spFileInfo = std::make_shared(); - } - if (bRecurse) - ScanDirectory(pathCurrent, spBasePathData, bRecurse, bIncludeDirs, afFilters); + ++stFilesCount; + } } } - return 0; + return stFilesCount; } + void TSubTaskScanDirectories::Store(const ISerializerPtr& spSerializer) const { ISerializerContainerPtr spContainer = spSerializer->GetContainer(_T("subtask_scan")); Index: src/libchengine/TSubTaskScanDirectory.h =================================================================== diff -u -r08717141ce5f6926116c298cbc9442094a45bb67 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TSubTaskScanDirectory.h (.../TSubTaskScanDirectory.h) (revision 08717141ce5f6926116c298cbc9442094a45bb67) +++ src/libchengine/TSubTaskScanDirectory.h (.../TSubTaskScanDirectory.h) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -52,8 +52,8 @@ void GetStatsSnapshot(TSubTaskStatsSnapshotPtr& spStats) const override; private: - int ScanDirectory(chcore::TSmartPath pathDirName, const TBasePathDataPtr& spBasePathData, - bool bRecurse, bool bIncludeDirs, const TFileFiltersArray& afFilters); + size_t ScanDirectory(chcore::TSmartPath pathDirName, const TBasePathDataPtr& spBasePathData, + bool bIncludeDirs, const TFileFiltersArray& afFilters, bool bExcludeEmptyDirs); void InitColumns(const serializer::ISerializerContainerPtr& spContainer) const; private: Index: src/libchengine/TTask.cpp =================================================================== diff -u -r20c1b142537a6a4a2a88b7ef722c65c374ece35f -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TTask.cpp (.../TTask.cpp) (revision 20c1b142537a6a4a2a88b7ef722c65c374ece35f) +++ src/libchengine/TTask.cpp (.../TTask.cpp) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -403,6 +403,7 @@ spSnapshot->SetIgnoreDirectories(GetTaskPropValue(m_tConfiguration)); spSnapshot->SetCreateEmptyFiles(GetTaskPropValue(m_tConfiguration)); + spSnapshot->SetExcludeEmptyDirectories(GetTaskPropValue(m_tConfiguration)); spSnapshot->SetBufferCount(GetTaskPropValue(m_tConfiguration)); TSubTaskStatsSnapshotPtr spCurrentSubTask = spSnapshot->GetSubTasksStats().GetCurrentSubTaskSnapshot(); Index: src/libchengine/TTaskConfigTracker.cpp =================================================================== diff -u -r2ffdfe76f53d4ae9f4e0ec09a56867804e14db6a -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TTaskConfigTracker.cpp (.../TTaskConfigTracker.cpp) (revision 2ffdfe76f53d4ae9f4e0ec09a56867804e14db6a) +++ src/libchengine/TTaskConfigTracker.cpp (.../TTaskConfigTracker.cpp) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -251,8 +251,10 @@ return eTO_CreateEmptyFiles; if (strOption == TaskPropData::GetPropertyName()) return eTO_CreateDirectoriesRelativeToRoot; - if (strOption == TaskPropData::GetPropertyName()) + if(strOption == TaskPropData::GetPropertyName()) return eTO_IgnoreDirectories; + if(strOption == TaskPropData::GetPropertyName()) + return eTO_ExcludeEmptyDirectories; if (strOption == TaskPropData::GetPropertyName()) return eTO_AlternateFilenameFormatString_AfterFirst; if (strOption == TaskPropData::GetPropertyName()) @@ -262,6 +264,6 @@ throw TCoreException(eErr_UnhandledCase, L"Option name not supported", LOCATION); // add new elements before this one - static_assert(eTO_Last == 27, "Function not updated to accommodate new enum options"); + static_assert(eTO_Last == 28, "Function not updated to accommodate new enum options"); } } Index: src/libchengine/TTaskConfiguration.h =================================================================== diff -u -re743cc944867ccfebf2fbf458eb171c56f0d76de -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TTaskConfiguration.h (.../TTaskConfiguration.h) (revision e743cc944867ccfebf2fbf458eb171c56f0d76de) +++ src/libchengine/TTaskConfiguration.h (.../TTaskConfiguration.h) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -57,6 +57,7 @@ eTO_CreateEmptyFiles, eTO_CreateDirectoriesRelativeToRoot, eTO_IgnoreDirectories, + eTO_ExcludeEmptyDirectories, eTO_AlternateFilenameFormatString_First, eTO_AlternateFilenameFormatString_AfterFirst, @@ -140,7 +141,8 @@ TASK_PROPERTY(eTO_CreateEmptyFiles, bool, _T("Operation.CreateEmptyFiles"), false); TASK_PROPERTY(eTO_CreateDirectoriesRelativeToRoot, bool, _T("Operation.CreateDirectoriesRelativeToRoot"), false); TASK_PROPERTY(eTO_IgnoreDirectories, bool, _T("Operation.IgnoreDirectories"), false); - + TASK_PROPERTY(eTO_ExcludeEmptyDirectories, bool, _T("Operation.ExcludeEmptyDirectories"), false); + // Naming settings TASK_PROPERTY(eTO_AlternateFilenameFormatString_First, string::TString, _T("Naming.AlternateFilenameFormatFirst"), _T("%name - copy%ext")); TASK_PROPERTY(eTO_AlternateFilenameFormatString_AfterFirst, string::TString, _T("Naming.AlternateFilenameFormatAfterFirst"), _T("%name - copy (%count)%ext")); Index: src/libchengine/TTaskStatsSnapshot.cpp =================================================================== diff -u -r08717141ce5f6926116c298cbc9442094a45bb67 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TTaskStatsSnapshot.cpp (.../TTaskStatsSnapshot.cpp) (revision 08717141ce5f6926116c298cbc9442094a45bb67) +++ src/libchengine/TTaskStatsSnapshot.cpp (.../TTaskStatsSnapshot.cpp) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -74,6 +74,7 @@ m_eOperationType = eOperation_None; m_bIgnoreDirectories = false; m_bCreateEmptyFiles = false; + m_bExcludeEmptyDirectories = false; m_ullCurrentBufferSize = 0; m_bCacheFilled = false; m_ullProcessedCount = 0; Index: src/libchengine/TTaskStatsSnapshot.h =================================================================== diff -u -r08717141ce5f6926116c298cbc9442094a45bb67 -rc88853d744d42c9d0d18d14f920190d535bb714a --- src/libchengine/TTaskStatsSnapshot.h (.../TTaskStatsSnapshot.h) (revision 08717141ce5f6926116c298cbc9442094a45bb67) +++ src/libchengine/TTaskStatsSnapshot.h (.../TTaskStatsSnapshot.h) (revision c88853d744d42c9d0d18d14f920190d535bb714a) @@ -99,6 +99,9 @@ bool GetCreateEmptyFiles() const { return m_bCreateEmptyFiles; } void SetCreateEmptyFiles(bool val) { m_bCreateEmptyFiles = val; } + bool GetExcludeEmptyDirectories() const { return m_bExcludeEmptyDirectories; } + void SetExcludeEmptyDirectories(bool val) { m_bExcludeEmptyDirectories = val; } + void SetCurrentBufferSize(unsigned long long ullSize) { m_ullCurrentBufferSize = ullSize; } unsigned long long GetCurrentBufferSize() const { return m_ullCurrentBufferSize; } @@ -133,6 +136,7 @@ EOperationType m_eOperationType; bool m_bIgnoreDirectories; bool m_bCreateEmptyFiles; + bool m_bExcludeEmptyDirectories = false; unsigned long long m_ullCurrentBufferSize; unsigned int m_uiBufferCount;