Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
dc3e4a2
JsonSchema: fixes copy-paste errors [ci skip]
CarterLi Oct 18, 2025
6a31736
Shell: fix fish version detection when `LC_ALL` is set
CarterLi Oct 19, 2025
ff28f58
Shell: supports brush version detection
CarterLi Oct 19, 2025
8f15c96
Merge remote-tracking branch 'origin/master' into dev
CarterLi Oct 20, 2025
904f860
Packaging: builds for all Ubuntu versions [ci skip]
CarterLi Oct 20, 2025
f71bb68
Logo (Builtin): adds MacaroniOS
CarterLi Oct 20, 2025
3fe926d
Doc: adds code-signing credit and privacy statement in README [ci skip]
CarterLi Oct 20, 2025
5cf3ab2
Utils (macOS): adds `ffCfDictGetDataAsString`
CarterLi Oct 20, 2025
64afaa0
Media (macOS): adds media cover extraction
CarterLi Oct 20, 2025
2d9bbc8
Media (Linux): adds media cover extraction
CarterLi Oct 20, 2025
faddef7
Media (Windows): adds media cover extraction
CarterLi Oct 21, 2025
5d73cc1
Media: save media cover to temp file
CarterLi Oct 21, 2025
338b552
Logo: adds support for using media cover as logo source
CarterLi Oct 21, 2025
c353bf3
Logo: adds automatic cleanup of temporary media cover files
CarterLi Oct 22, 2025
db623b9
CI (Linux): adds Debian i386 packaging and verify deb package in CI
CarterLi Oct 22, 2025
758f96d
Icons (Windows): hides module when no icons are found
CarterLi Oct 24, 2025
ac62442
CMake: refines yyjson config and Apple rpath handling
CarterLi Oct 28, 2025
7d665b2
GPU: unifies GPU PCI device ID calculation logic across different pla…
CarterLi Oct 30, 2025
25e84de
GPU: unifies non-pci GPU device ID formatting across platforms
CarterLi Oct 30, 2025
11d1754
GPU: skips auxiliary display controllers
CarterLi Oct 30, 2025
04d6b14
GPU (NetBSD): adds native GPU detection support
CarterLi Oct 31, 2025
b761034
OS (Linux): prints debian version on Raspbery Pi OS
CarterLi Oct 31, 2025
e0fd730
Logo (Builtin): add Vincent OS
CarterLi Oct 31, 2025
907567f
GPU (NetBSD): improves performance; drops libpciaccess dependency
CarterLi Nov 1, 2025
e63b777
GPU: handles missing GPU type as null in JSON output
CarterLi Nov 1, 2025
cc6273f
GPU (NetBSD): don't use system function name
CarterLi Nov 1, 2025
2e73a90
GPU (OpenBSD): adds native GPU detection support
CarterLi Nov 1, 2025
578ca23
GPU (Hurd): adds support (requires libpciaccess)
CarterLi Nov 1, 2025
6b8a62d
Linux (Host): improves Mac family detection by using prefix match
CarterLi Nov 4, 2025
c51a164
PublicIP / Weather: cleans up states after detection
CarterLi Nov 5, 2025
dbb9d8a
Display: adds missing `#include`
CarterLi Nov 5, 2025
302b8a7
CommandLine: adds dynamic output refresh support with interval option
CarterLi Nov 5, 2025
7638e0e
CMake: improves wordexp/glob detection and messaging
CarterLi Nov 5, 2025
645bf5c
Disk: moves disk hiding by folder and FS type to detection code
CarterLi Nov 6, 2025
7aaad5e
Processing: refactors process execution to separate spawning and reading
CarterLi Nov 10, 2025
ea92ad3
Command: adds `parallel` and `useStdErr` options
CarterLi Nov 10, 2025
9401a4b
Processing: adds a missing header
CarterLi Nov 10, 2025
448de9a
Command: makes compiler happy
CarterLi Nov 10, 2025
298c043
Examples: improves clang version extraction method in `25.jsonc` [ci …
CarterLi Nov 11, 2025
cb0a88d
[Command] enables parallel command execution by default
CarterLi Nov 11, 2025
056fe21
Examples/25: removes `parallel: true` since we had it enabled by defa…
CarterLi Nov 11, 2025
8b8eb6f
TerminalShell (Linux): ignores `run-parts`
CarterLi Nov 11, 2025
f8bc1cb
Releases: v2.55.0
CarterLi Nov 11, 2025
11cd715
Logo (Builtin): tidy [ci skip]
CarterLi Nov 11, 2025
e6b0bd3
Media: fixes album cover serialization in JSON result
CarterLi Nov 11, 2025
df15bbc
Media: moves media cover cleanup logic to media detection
CarterLi Nov 11, 2025
0aed890
Chore: silenses some compiler warnings
CarterLi Nov 11, 2025
a9f1f9a
Doc: update changelog
CarterLi Nov 11, 2025
084f929
Media: updates naming convention from `mediacover` to `media-cover` f…
CarterLi Nov 11, 2025
9f24e43
Media (Linux): handles invalid percent-encoding in cover metadata
CarterLi Nov 11, 2025
fb91175
Shell: makes fish shell version detection more robust
CarterLi Nov 11, 2025
662f512
Shell: makes fish shell version detection more robust (v2)
CarterLi Nov 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,14 @@ jobs:
run: cmake --version

- name: configure project
run: CC=gcc-13 PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/lib/pkgconfig:$PKG_CONFIG_PATH cmake -DCMAKE_C_FLAGS="-m32 -march=i686 -mtune=i686" -DCMAKE_SYSTEM_PROCESSOR_OVERRIDE=i686 -GNinja -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_DIRECTX_HEADERS=Off .
run: CC=gcc-13 PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/lib/pkgconfig:$PKG_CONFIG_PATH cmake -DCMAKE_C_FLAGS="-m32 -march=i686 -mtune=i686" -DCMAKE_SYSTEM_PROCESSOR_OVERRIDE=i686 -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=i386 -GNinja -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_DIRECTX_HEADERS=Off .

- name: build project
run: cmake --build . --target package --verbose -j4

- name: check deb package
run: dpkg -I fastfetch-*.deb

- name: list features
run: ./fastfetch --list-features

Expand Down
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
# 2.55.0

Changes:
* Commands are now executed in parallel by default to improve performance (#2045, Command)
* This behavior can be disabled in the config file with `"parallel": false` if it causes problems with certain scripts
* Folder/filesystem hiding is moved to the detection stage; hidden entries are no longer probed, improving performance (#2043, Disk)

Features:
* Adds `command.parallel` and `command.useStdErr` config options (Command)
* `parallel`: set to `false` to disable parallel execution (see Changes above)
* `useStdErr`: set to `true` to use stderr output instead of stdout
* Adds the command-line flag `--dynamic-interval <interval-in-ms>` to enable dynamic output auto-refresh (#2041)
* Due to internal limitations, some modules do not support dynamic updates (notably Display and Media)
* Adds support for using the current playing media's cover art as a logo source (Media / Logo)
* Usage: `"logo": { "type": "<image-protocol>", "source": "media-cover" }` in JSON config; or `--<image-protocol> media-cover` in command line
* Supports local sources only
* Adds native GPU detection support on OpenBSD and NetBSD (instead of depending on `libpciaccess`) (GPU)
* No functional changes
* Root privileges are required to access PCI config space on OpenBSD (as always)
* Adds GPU detection support on GNU/Hurd (GPU)
* Requires building with `libpciaccess`
* Shows Debian point release on Raspberry Pi OS (#2032, OS, Linux)
* Adds `Brush` shell version detection (Shell)
* Improves Mac family detection via prefix matching (Host)

Bugfixes:
* Ignores `run-parts` during terminal/shell detection (#2048, Terminal / Shell, Linux)
* Fixes fish version detection when `LC_ALL` is set (#2014, Shell, Linux)
* Hides the module when no desktop icons are found (#2023, Icons, Windows)
* Skips auxiliary display controllers to prevent the module from reporting duplicate entries (#2034, GPU, Linux)
* Refines Apple rpath handling; fixes building for the Homebrew version on macOS (#1998, CMake)

Logos:
* Adds Vincent OS and MacaroniOS

# 2.54.0

Windows binaries in Release page are now signed using SignPath.
Windows binaries in Release page are now signed by SignPath.

Changes:
* Moves macOS and Windows design language detection from the DE module to the Theme module
Expand Down
31 changes: 19 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.54.0
VERSION 2.55.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -93,7 +93,7 @@ cmake_dependent_option(ENABLE_DIRECTX_HEADERS "Enable DirectX headers for WSL" O
cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX OR ANDROID OR DragonFly OR Haiku OR GNU" OFF)
cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND" OFF)
cmake_dependent_option(ENABLE_LIBZFS "Enable libzfs" ON "LINUX OR FreeBSD OR SunOS" OFF)
cmake_dependent_option(ENABLE_PCIACCESS "Enable libpciaccess" ON "NetBSD OR OpenBSD" OFF)
cmake_dependent_option(ENABLE_PCIACCESS "Enable libpciaccess" ON "GNU" OFF)

option(ENABLE_ZLIB "Enable zlib" ON)
option(ENABLE_SYSTEM_YYJSON "Use system provided (instead of fastfetch embedded) yyjson library" OFF)
Expand Down Expand Up @@ -389,6 +389,7 @@ set(LIBFASTFETCH_SRC
src/detection/chassis/chassis.c
src/detection/cpu/cpu.c
src/detection/cpuusage/cpuusage.c
src/detection/command/command.c
src/detection/disk/disk.c
src/detection/diskio/diskio.c
src/detection/displayserver/displayserver.c
Expand Down Expand Up @@ -794,7 +795,7 @@ elseif(NetBSD)
src/detection/displayserver/linux/xcb.c
src/detection/displayserver/linux/xlib.c
src/detection/font/font_linux.c
src/detection/gpu/gpu_general.c
src/detection/gpu/gpu_nbsd.c
src/detection/gpu/gpu_pci.c
src/detection/gtk_qt/gtk.c
src/detection/host/host_nbsd.c
Expand Down Expand Up @@ -878,7 +879,7 @@ elseif(OpenBSD)
src/detection/displayserver/linux/xlib.c
src/detection/font/font_linux.c
src/detection/gpu/gpu_pci.c
src/detection/gpu/gpu_general.c
src/detection/gpu/gpu_obsd.c
src/detection/gtk_qt/gtk.c
src/detection/host/host_obsd.c
src/detection/lm/lm_nosupport.c
Expand Down Expand Up @@ -1254,7 +1255,7 @@ elseif(GNU)
src/detection/displayserver/linux/xcb.c
src/detection/displayserver/linux/xlib.c
src/detection/font/font_linux.c
src/detection/gpu/gpu_nosupport.c
src/detection/gpu/gpu_general.c
src/detection/gpu/gpu_pci.c
src/detection/gtk_qt/gtk.c
src/detection/host/host_nosupport.c
Expand Down Expand Up @@ -1340,15 +1341,15 @@ add_library(libfastfetch OBJECT
)

if(yyjson_FOUND)
target_compile_definitions(libfastfetch PUBLIC FF_USE_SYSTEM_YYJSON)
target_compile_definitions(libfastfetch PUBLIC FF_USE_SYSTEM_YYJSON=1)
target_link_libraries(libfastfetch PUBLIC yyjson::yyjson)
# `target_link_libraries(yyjson::yyjson)` sets rpath implicitly
else()
# Used for dlopen finding dylibs installed by homebrew
# `/opt/homebrew/lib` is not on in dlopen search path by default
if(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/opt/homebrew/lib -Wl,-rpath,/usr/local/lib")
endif()
endif()

# Used for dlopen finding dylibs installed by homebrew
# `/opt/homebrew/lib` is not on in dlopen search path by default
if(APPLE AND NOT BINARY_LINK_TYPE STREQUAL "dlopen")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/opt/homebrew/lib -Wl,-rpath,/usr/local/lib")
endif()

if(ANDROID)
Expand Down Expand Up @@ -1823,8 +1824,14 @@ if(NOT WIN32)
CHECK_INCLUDE_FILE("wordexp.h" HAVE_WORDEXP)
if(HAVE_WORDEXP)
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_WORDEXP=1)
message(STATUS "wordexp.h found, wordexp support enabled")
else()
set(ENABLE_WORDEXP OFF)
endif()
endif()
if(NOT ENABLE_WORDEXP)
message(STATUS "wordexp.h not found or disabled, glob used instead")
endif()
if(ENABLE_THREADS AND CMAKE_USE_PTHREADS_INIT)
CHECK_INCLUDE_FILE("pthread_np.h" HAVE_PTHREAD_NP)
if(HAVE_PTHREAD_NP)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ If you find Fastfetch useful, please consider donating.
* Current maintainer: [@CarterLi](https://paypal.me/zhangsongcui)
* Original author: [@LinusDierheimer](https://github.com/sponsors/LinusDierheimer)

## Code signing

* Free code signing provided by [SignPath.io](https://about.signpath.io/), certificate by [SignPath Foundation](https://signpath.org/)
* This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it

## Star History

Give us a star to show your support!
Expand Down
14 changes: 13 additions & 1 deletion debian/changelog → debian/changelog.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
fastfetch (2.54.1~#UBUNTU_CODENAME#) #UBUNTU_CODENAME#; urgency=medium

* Fix building on plucky

-- Carter Li <zhangsongcui@live.cn> Mon, 20 Oct 2025 14:27:02 +0800

fastfetch (2.54.0~#UBUNTU_CODENAME#) #UBUNTU_CODENAME#; urgency=medium

* Update to 2.54.0
* Test independent changelog entries for different Ubuntu releases

-- Carter Li <zhangsongcui@live.cn> Mon, 20 Oct 2025 10:47:02 +0800

fastfetch (2.53.0) jammy; urgency=medium

* Update to 2.53.0
Expand Down Expand Up @@ -435,4 +448,3 @@ fastfetch (2.7.1) jammy; urgency=medium
* Initial release.

-- Carter Li <zhangsongcui@live.cn> Tue, 06 Feb 2024 15:01:11 +0800

2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: fastfetch
Section: universe/utils
Priority: optional
Maintainer: Carter Li <zhangsongcui@live.cn>
Build-Depends: libelf-dev, libvulkan-dev, libwayland-dev, libxrandr-dev, libxcb-randr0-dev, libdconf-dev, libdbus-1-dev, libmagickcore-dev, libsqlite3-dev, librpm-dev, libegl-dev, libglx-dev, ocl-icd-opencl-dev, libpulse-dev, libdrm-dev, libddcutil-dev, libchafa-dev, directx-headers-dev, pkgconf, cmake (>= 3.12), debhelper (>= 11.2), dh-cmake, dh-cmake-compat (= 1), dh-sequence-cmake, dh-sequence-ctest, ninja-build
Build-Depends: libelf-dev, libvulkan-dev, libwayland-dev, libxrandr-dev, libxcb-randr0-dev, libdconf-dev, libdbus-1-dev, libmagickcore-dev, libsqlite3-dev, librpm-dev, libegl-dev, libglx-dev, ocl-icd-opencl-dev, libpulse-dev, libdrm-dev, libddcutil-dev, libchafa-dev, directx-headers-dev, pkgconf, cmake (>= 3.12), debhelper (>= 11.2), dh-cmake, dh-cmake-compat (= 1), dh-sequence-cmake, dh-sequence-ctest, ninja-build, python3-setuptools
Standards-Version: 4.0.0
Homepage: https://github.com/fastfetch-cli/fastfetch

Expand Down
1 change: 0 additions & 1 deletion debian/files

This file was deleted.

76 changes: 74 additions & 2 deletions debian/publish.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,76 @@
#!/usr/bin/env bash
# WARNING: DO NOT RUN THIS SCRIPT UNLESS YOU KNOW WHAT YOU ARE DOING.

debuild -S -i -I
dput ppa:zhangsongcui3371/fastfetch ~/fastfetch_*.changes
set -euo pipefail

command -v debuild >/dev/null 2>&1 || { echo "debuild not found. Install devscripts." >&2; exit 1; }
command -v dput >/dev/null 2>&1 || { echo "dput not found." >&2; exit 1; }

SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
ROOT_DIR="$(cd -- "$SCRIPT_DIR/.." >/dev/null 2>&1 && pwd)"
OUT_DIR="$(dirname "$ROOT_DIR")"
PPA="ppa:zhangsongcui3371/fastfetch"
CODENAMES=( jammy noble plucky questing resolute )
DRY_RUN=0

if [[ -d "$OUT_DIR/build" ]]; then
echo "Output directory exists: $OUT_DIR/build" >&2
echo "Please move or delete it before proceeding." >&2
exit 1
fi

TEMPLATE="$ROOT_DIR/debian/changelog.tpl"
CHANGELOG_DEBIAN="$ROOT_DIR/debian/changelog"

if [[ ! -f "$TEMPLATE" ]]; then
echo "Template not found: $TEMPLATE" >&2
exit 1
fi

if ! grep -q '#UBUNTU_CODENAME#' "$TEMPLATE"; then
echo "Template missing placeholder: #UBUNTU_CODENAME#" >&2
exit 1
fi

echo "IMPORTANT: Before proceeding, please ensure that 'debian/changelog.tpl' is up-to-date"
echo " with the correct version number, release notes, and maintainer information."
echo
echo " The template must contain a placeholder like '#UBUNTU_CODENAME#' for the codename."
echo
read -p "Have you reviewed and updated 'debian/changelog.tpl'? (y/N): " -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi

cleanup() {
rm -f "$CHANGELOG_DEBIAN"
rm -f "$ROOT_DIR/debian/files"
}
trap cleanup EXIT

shopt -s nullglob

for codename in "${CODENAMES[@]}"; do
echo "==> Publishing distro: $codename"
sed "s/#UBUNTU_CODENAME#/${codename}/g" "$TEMPLATE" > "$CHANGELOG_DEBIAN"

( cd "$ROOT_DIR" && debuild -S -i -I )

changes=( "$OUT_DIR"/fastfetch_*~${codename}_source.changes )
if [[ ${#changes[@]} -ne 1 ]]; then
echo "Unable to uniquely identify .changes for '$codename' in: $OUT_DIR" >&2
printf 'Found:\n'; printf ' %s\n' "${changes[@]}" >&2 || true
exit 1
fi

if [[ $DRY_RUN -eq 1 ]]; then
echo "[DRY-RUN] dput \"$PPA\" \"${changes[0]}\""
else
dput "$PPA" "${changes[0]}"
fi

rm -f "$OUT_DIR"/fastfetch_*~${codename}_source.{changes,dsc,tar.*}

echo "<== Done: $codename"
done
15 changes: 12 additions & 3 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@
},
"type": {
"type": "string",
"description": "Set whether to show icon before string keys",
"description": "Set whether to show builtin icon before string keys",
"oneOf": [
{
"const": "none",
Expand All @@ -1020,7 +1020,7 @@
},
{
"const": "icon",
"description": "Show icon keys (requires newest nerd font)"
"description": "Show builtin icon (requires newest nerd font)"
},
{
"const": "both",
Expand All @@ -1047,7 +1047,6 @@
"description": "Show both icon and string with 4 spaces between them"
}
],
],
"default": "string"
},
"paddingLeft": {
Expand Down Expand Up @@ -2102,6 +2101,16 @@
"description": "Set the command text to be executed",
"type": "string"
},
"useStdErr": {
"description": "Set if stderr should be used instead of stdout for command output",
"type": "boolean",
"default": false
},
"parallel": {
"description": "Set if the command should be executed in parallel with other commands\nImprove performance when using multiple commands, but may cause issues with some commands",
"type": "boolean",
"default": true
},
"key": {
"$ref": "#/$defs/key"
},
Expand Down
2 changes: 1 addition & 1 deletion presets/examples/25.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
},
"keyIcon": "",
"key": "│{#red}│ {icon} Clang │{$4}│{#keys}│{$2}",
"text": "clang --version | head -1 | awk '{print $NF}'",
"text": "clang --version | sed -n 's/.*version \\([0-9][0-9.]*\\).*/\\1/p'",
"format": "clang {}"
},
{
Expand Down
13 changes: 10 additions & 3 deletions src/common/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ static void initState(FFstate* state)
ffPlatformInit(&state->platform);
state->configDoc = NULL;
state->resultDoc = NULL;
state->dynamicInterval = 0;

{
// don't enable bright color if the terminal is in light mode
Expand Down Expand Up @@ -74,6 +75,9 @@ static void resetConsole(void)
#if defined(_WIN32)
fflush(stdout);
#endif

if(instance.state.dynamicInterval > 0)
fputs("\033[?1049l", stdout); // Disable alternate buffer
}

#ifdef _WIN32
Expand Down Expand Up @@ -130,14 +134,17 @@ void ffStart(void)
if(ffDisableLinewrap)
fputs("\033[?7l", stdout);

if(instance.state.dynamicInterval > 0)
{
fputs("\033[?1049h\033[H", stdout); // Enable alternate buffer
fflush(stdout);
}

ffLogoPrint();
}

void ffFinish(void)
{
if(instance.config.logo.printRemaining)
ffLogoPrintRemaining();

resetConsole();
}

Expand Down
1 change: 1 addition & 0 deletions src/common/io/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ static inline bool ffSearchUserConfigFile(const FFlist* configDirs, const char*
}

FFNativeFD ffGetNullFD(void);
bool ffRemoveFile(const char* fileName);

#ifdef _WIN32
// Only O_RDONLY is supported
Expand Down
6 changes: 5 additions & 1 deletion src/common/io/io_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#if FF_HAVE_WORDEXP
#include <wordexp.h>
#else
#warning "<wordexp.h> is not available, use glob(3) instead"
#include <glob.h>
#endif

Expand Down Expand Up @@ -372,3 +371,8 @@ FFNativeFD ffGetNullFD(void)
hNullFile = open("/dev/null", O_WRONLY | O_CLOEXEC);
return hNullFile;
}

bool ffRemoveFile(const char* fileName)
{
return unlink(fileName) == 0;
}
5 changes: 5 additions & 0 deletions src/common/io/io_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,3 +371,8 @@ FFNativeFD ffGetNullFD(void)
});
return hNullFile;
}

bool ffRemoveFile(const char* fileName)
{
return DeleteFileA(fileName) != FALSE;
}
Loading
Loading