Skip to content

Misc: Ignore error that file exists when creating it#346

Merged
Leleat merged 1 commit intoubuntu:mainfrom
jtojnar:silence-expected-exists
Jun 2, 2024
Merged

Misc: Ignore error that file exists when creating it#346
Leleat merged 1 commit intoubuntu:mainfrom
jtojnar:silence-expected-exists

Conversation

@jtojnar
Copy link
Copy Markdown

@jtojnar jtojnar commented May 29, 2024

Those files existing is expected at all times after the initial creation.
As a result, journal continued being spammed with errors like:

Gio.IOErrorEnum: Error creating directory ~/.config/tiling-assistant: File exists
Gio.IOErrorEnum: Error opening file “~/.config/tiling-assistant/tiledSessionRestore.json”: File exists

The logging was only added in 50a1757 to appease ESLint,
so let’s add more specific catch body instead.

Those files existing is expected at all times after the initial creation.
As a result, journal continued being spammed with errors like:

    Gio.IOErrorEnum: Error creating directory ~/.config/tiling-assistant: File exists
    Gio.IOErrorEnum: Error opening file “~/.config/tiling-assistant/tiledSessionRestore.json”: File exists

The logging was only added in 50a1757 to appease ESLint,
so let’s add more specific `catch` body instead.
@jtojnar jtojnar force-pushed the silence-expected-exists branch from c5486d2 to 86acc24 Compare May 29, 2024 00:03
@Leleat
Copy link
Copy Markdown
Collaborator

Leleat commented Jun 2, 2024

Thanks!

PS. The CI fails because of the {} around the if statements. I am gonna ignore this here since I am gonna force the usage of {} around one-liners with the new linter rules in #342 anyway...

@Leleat Leleat merged commit 7b19935 into ubuntu:main Jun 2, 2024
@jtojnar jtojnar deleted the silence-expected-exists branch June 2, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants