https://bugs.kde.org/show_bug.cgi?id=299155

--- Comment #9 from Danil Shein <dsh...@altlinux.org> ---
(In reply to Danil Shein from comment #7)
> Still an issue in KDE Frameworks 5.70.0

One suggestion about root cause from my experience with KPropertiesDialog
source code:

As far as I cold understand KPropertiesDialog receives KFileItem or
KFileItemList instance as input.

All ACLs related data is stored in and managed through related KFileItem
UDSEntry.

It looks like when you've reopen file properties dialog again after ACL changes
applied it is receive an KFileItem without appropriate UDSEntry and displays
ACL as inherited from regular UNIX permissions.

Can't say where and why it actually happens.

My suggestion is based on experience playing around with code:

    path = "/home/test/1.txt"; // file with ACL
    KFileItem kfitem(QUrl::fromLocalFile(path));
    KPropertiesDialog kpd(QString("File properties"), 0);

    kpd.showDialog(kfitem, 0); // always display ACLs inherited from regular
permissions (incorrect)
    kpd.showDialog(QUrl::fromLocalFile(path), 0); // always display consistent
file ACls

    auto job = KIO::stat(url);
    job->exec();
    KIO::UDSEntry entry = job->statResult();
    kfitem = KFileItem(entry, url);
    kpd.showDialog(kfitem, 0); // display consistent file ACls

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to