Skip to content
Commit 659a3e48 authored by Laurent Montel's avatar Laurent Montel
Browse files

Fix ignore path support. Fix crash when we load root path

parent af5c4a56
Pipeline #405905 failed with stage
in 6 minutes and 5 seconds
  • Developer

    @mlaurent this appears to have broken the CI. Can you take a look and fix it? Thanks!

  • Author Developer

    I will look at it

  • Contributor

    I'm afraid this commit breaks the "do not scan this folder" feature, all folders listed in my do not scan list are scanned and displayed nevertheless. Reverting line 46 fixed this problem for me locally.

  • Developer
  • Author Developer

    For me the "if (!ignorePath.startsWith(path)) {" is logic (and work for me locally) If ignore path is not in path we scan otherwise not.

  • Contributor

    It seems m_trees stores the paths that are to be ignored, rather than the paths to be scanned. I've temporarily modified the LocalLister constructor to print each entry pointed by m_trees at the end. With my Downloads directory already in my do not scan list, the output is as follows:

    m_trees->folder:  "/dev/"
    m_trees->folder:  "/proc/"
    m_trees->folder:  "/sys/"
    m_trees->folder:  "/root/"
    m_trees->folder:  "/run/"
    m_trees->folder:  "/run/lock/"
    m_trees->folder:  "/tmp/"
    m_trees->folder:  "/home/"
    m_trees->folder:  "/boot/efi/"
    m_trees->folder:  "/run/user/1000/"
    m_trees->folder:  "/run/user/1000/doc/"

    When I revert line 46, I get this output (which works):

    m_trees->folder:  "/dev/"
    m_trees->folder:  "/proc/"
    m_trees->folder:  "/sys/"
    m_trees->folder:  "/root/"
    m_trees->folder:  "/home/efe/Downloads/"
    m_trees->folder:  "/run/"
    m_trees->folder:  "/run/lock/"
    m_trees->folder:  "/tmp/"
    m_trees->folder:  "/home/"
    m_trees->folder:  "/boot/efi/"
    m_trees->folder:  "/run/user/1000/"
    m_trees->folder:  "/run/user/1000/doc/"

    Therefore, ignorePath.startsWith(path) looks reasonable to me.

    Edited by Efe Çiftci
  • Yifan Zhu @fanzhuyifan ·
    Developer

    Users are reporting that ignore path functionality is broken (473951) for versions containing this commit. On my own computer, I can also verify that the previous behavior without this commit is correct.

    So could we revert this commit?

  • Yifan Zhu @fanzhuyifan

    mentioned in merge request !98 (merged)

    ·

    mentioned in merge request !98 (merged)

    Toggle commit list
  • Yifan Zhu @fanzhuyifan

    mentioned in commit 10f1fbf0

    ·

    mentioned in commit 10f1fbf0

    Toggle commit list
  • Yifan Zhu @fanzhuyifan

    mentioned in commit 3a50f3da

    ·

    mentioned in commit 3a50f3da

    Toggle commit list
  • Harald Sitter 🐧 @sitter

    mentioned in merge request !99 (merged)

    ·

    mentioned in merge request !99 (merged)

    Toggle commit list
  • Yifan Zhu @fanzhuyifan

    mentioned in commit ca940302

    ·

    mentioned in commit ca940302

    Toggle commit list
  • Yifan Zhu @fanzhuyifan

    mentioned in merge request plasma/kwin!4820 (merged)

    ·

    mentioned in merge request plasma/kwin!4820 (merged)

    Toggle commit list
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment