Skip to content
Commit 66d1b3ce authored by Tomi Ollila's avatar Tomi Ollila Committed by Anas Nashif
Browse files

kconfig: kconfiglib.py: Backup files only



The _save_old() to return early if <filename> is not file (or symlink
to a file).

This is simplest alternative to avoid attempt to rename /dev/null
(which could succeed).

This also keeps fifos (perhaps nonexistent potential usage but
this is nicer).

If <filename> were directory or socket, after shutil.copyfile(),
writing to the file (by caller, _write_config()), would fail.

Fixes #31362

Co-authored-by: default avatarMarti Bolivar <marti.bolivar@nordicsemi.no>
Signed-off-by: default avatarTomi Ollila <tomi.ollila@iki.fi>
parent 3c3504f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment