Browse Source

Bug 2094: Directory coloring rules on remote panel do not work

https://winscp.net/tracker/2094

Source commit: b7534ecf9798844b903c1d8872a41fe691175a00
Martin Prikryl 3 years ago
parent
commit
7e969ed6f4
1 changed files with 5 additions and 0 deletions
  1. 5 0
      source/forms/CustomScpExplorer.cpp

+ 5 - 0
source/forms/CustomScpExplorer.cpp

@@ -10779,6 +10779,11 @@ void __fastcall TCustomScpExplorerForm::DirViewGetItemColor(
 
   TCustomDirView * DirView = DebugNotNull(dynamic_cast<TCustomDirView *>(Sender));
   bool Local = (dynamic_cast<TUnixDirView *>(DirView) == NULL);
+  // TUnixDirView::ItemFullFileName returns trailing backslash for directories, what filemask cannot deal with
+  if (!Local && Directory)
+  {
+    FileName = UnixExcludeTrailingBackslash(FileName);
+  }
   for (TFileColorData::TList::const_iterator Iter = FFileColors.begin(); Iter != FFileColors.end(); Iter++)
   {
     bool ImplicitMatch;