Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

mtime of existing directories starting with ~ is always 0 in the registry cache #2797

@mike-fabian

Description

@mike-fabian

Distribution and Version

Fedora 42, 43

Desktop Environment and Version

happens with any desktop environment when

Session Type

Wayland

Application and Version

not related to any specific application

IBus version

ibus-1.5.33~beta1-2.fc43.x86_64, ibus-1.5.32-6.fc42.x86_64

Issue Description

Currently, the mtime of files or directories in observed-paths which start with a ~ is always 0, no matter whether they exist or not and no matter whether something changed there or not. For example:

(base) mfabian@hathi:/local/mfabian/src/ibus (observed-path-tilde *$%)
$ ibus read-cache | grep mtime 
        <path mtime="1756572087" type="dir" path="/usr/share/ibus/component">
                <path mtime="1737072000" >/usr/share/ibus/component/libzhuyin.xml</path>
                <path mtime="1750896000" >/usr/share/ibus/component/dconf.xml</path>
                <path mtime="1737072000" >/usr/share/ibus/component/kkc.xml</path>
                <path mtime="1756367111" >/usr/share/ibus/component/simple.xml</path>
                <path mtime="1737072000" >/usr/share/ibus/component/sayura.xml</path>
                <path mtime="1739836800" >/usr/share/ibus/component/anthy.xml</path>
                <path mtime="0" >~/.config/ibus-anthy/engines.xml</path>
                <path mtime="1739836800" >/usr/share/ibus-anthy/engine/default.xml</path>
                <path mtime="1737072000" >/usr/share/ibus/component/mozc.xml</path>
                <path mtime="1736899200" >/usr/share/ibus/component/stt.xml</path>
                <path mtime="1745778627" >/usr/share/ibus-stt</path>
                <path mtime="1745778627" >/usr/share/ibus-stt/formatting</path>
                <path mtime="1745778627" >/usr/share/ibus-stt/numbers</path>
                <path mtime="1754697600" >/usr/share/ibus/component/table.xml</path>
                <path mtime="1754764688" >/usr/share/ibus-table/tables/</path>
                <path mtime="1750896000" >/usr/share/ibus/component/gtkextension.xml</path>
                <path mtime="1698138400" >/usr/share/ibus/component/hiragana.xml</path>
                <path mtime="1737072000" >/usr/share/ibus/component/uniemoji.xml</path>
                <path mtime="1753747200" >/usr/share/ibus/component/typing-booster.xml</path>
                <path mtime="1757432450" >/usr/share/ibus-typing-booster/data/</path>
                <path mtime="1757446041" >/usr/share/ibus-typing-booster/data/annotationsDerived</path>
                <path mtime="1757446041" >/usr/share/ibus-typing-booster/data/annotations</path>
                <path mtime="0" >/usr/local/share/m17n/</path>
                <path mtime="1749571828" >/usr/share/m17n/</path>
                <path mtime="1745777823" >/usr/share/m17n/icons</path>
                <path mtime="1745777802" >/usr/share/m17n/scripts</path>
                <path mtime="0" >~/.m17n.d/</path>
                <path mtime="1737072000" >/usr/share/ibus/component/org.freedesktop.cangjie.ibus.Quick.xml</path>
                <path mtime="1737072000" >/usr/share/ibus/component/hangul.xml</path>
                <path mtime="1755993600" >/usr/share/ibus/component/chewing.xml</path>
                <path mtime="1737072000" >/usr/share/ibus/component/org.freedesktop.cangjie.ibus.Cangjie.xml</path>
                <path mtime="1743984000" >/usr/share/ibus/component/m17n.xml</path>
                <path mtime="1749571828" >/usr/share/m17n/</path>
                <path mtime="1745777823" >/usr/share/m17n/icons</path>
                <path mtime="1745777802" >/usr/share/m17n/scripts</path>
                <path mtime="1749552043" >/usr/share/ibus-m17n/default.xml</path>
                <path mtime="0" >~/.m17n.d/</path>
                <path mtime="1751983814" >/usr/share/ibus/component/braille.xml</path>
                <path mtime="1750896000" >/usr/share/ibus/component/gtkpanel.xml</path>
                <path mtime="1750723200" >/usr/share/ibus/component/libpinyin.xml</path>
                <path mtime="0" >~/.config/ibus/libpinyin/engines.xml</path>
                <path mtime="1750723200" >/usr/share/ibus-libpinyin/default.xml</path>
                <path mtime="1737072000" >/usr/share/ibus/component/unikey.xml</path>
                <path mtime="1660579645" >/usr/share/ibus/component/openbangla.xml</path>
(base) mfabian@hathi:/local/mfabian/src/ibus (observed-path-tilde *$%)
$ ls ~/.config/ibus-anthy/engines.xml
ls: '/home/mfabian/.config/ibus-anthy/engines.xml' にアクセスできません: そのようなファイルやディレクトリはありません
(base) mfabian@hathi:/local/mfabian/src/ibus (observed-path-tilde *$%)
$ ls /usr/local/share/m17n/
ls: '/usr/local/share/m17n/' にアクセスできません: そのようなファイルやディレクトリはありません
(base) mfabian@hathi:/local/mfabian/src/ibus (observed-path-tilde *$%)
$ ls ~/.m17n.d/
 bn-bijoyClassic.mim       config.mic-20250504   ipa-x-sampa.mim         mdb.dir                  test-savannah-67107-2.mim       test.mim.~3~           yi-telmac.mim
 bn-bijoyUnicode.mim       config.mic.~1~        ispell.mim              nil-mike.mim             test-savannah-67107-2.mim.~1~   test.mim.~4~
'bn-khipro(old).mim'       cop-greek-kbd.mim     ja-skip.mim             russian-elecom.mim       test-savannah-67107.mim         tokipona.mim
 bn-khipro-26.2.mim@       cuneiform.mim@        latex.mim               t-test-mike.mim          test-savannah-67107.mim.~1~     tokipona.mim.orig
 bn-national-jatiya.mim@   emoticon-table.mim    latn-pre.mim            te-itrans-itt533.mim     test.mim                        unicode-names.mim
 config.mic                german-mike.mim       lean-multi-choice.mim   test-issue-746.mim       test.mim.~1~                    vi-telex-mcsinyx.mim
 config.mic-20220831       icons/                lean.mim                test-issue-746.mim.~1~   test.mim.~2~                    xsampa.mim
(base) mfabian@hathi:/local/mfabian/src/ibus (observed-path-tilde *$%)

I.e. for ~/.config/ibus-anthy/engines.xml and /usr/local/share/m17n/ it is OK that the mtime is 0 because they don't exist.

But ~/.m17n.d/ does exist, so the real mtime should be used.

The reason why getting the mtime fails is that ~ is not expanded before calling g_stat ().

Steps to Reproduce

1. Make sure `~/.m17n.d` exists: `mkdir ~/.m17n.d`
2. `touch ~/.m17n.d`
3. `ibus write-cache`
4. `ibus read-cache | grep mtime` 

Look for the `mtime` for the `~/.m17n.d` directory in the `ibus read-cache` output, it is always 0.

Can you reproduce your problem when you restart ibus-daemon? (yes / no)

Yes.

Do you see any errors when you run ibus-daemon with the verbose option?

No.

Can you reproduce your problem with a new user account instead of the

current your account? (yes / no)

Yes.

Add any other context about the problem here.

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions