xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 046ec3fc1c8120f493f91560019a7b1b2d0d1d81

Check conversion result in win_get_file_attrs()
Author: xaizek
Author date (UTC): 2026-11-15 10:26
Committer name: xaizek
Committer date (UTC): 2026-11-15 10:26
Parent(s): 3d5c7470f73475851c6a93cdc4c7ec6d9ea2d75a
Signing key: 99DC5E4DB05F6BE2
Tree: 33b8843bbf823fa0b5494e0517e479166c4e74d0
File Lines added Lines deleted
src/utils/utils_win.c 7 5
File src/utils/utils_win.c changed (mode: 100644) (index 8bf96970e..a54d8d5f4)
... ... win_to_unix_time(FILETIME ft)
1201 1201 DWORD DWORD
1202 1202 win_get_file_attrs(const char path[]) win_get_file_attrs(const char path[])
1203 1203 { {
1204 DWORD attr;
1205 wchar_t *utf16_path;
1206
1207 1204 if(is_path_absolute(path) && !is_unc_path(path)) if(is_path_absolute(path) && !is_unc_path(path))
1208 1205 { {
1209 1206 if(isalpha(path[0]) && !drive_exists(path[0])) if(isalpha(path[0]) && !drive_exists(path[0]))
 
... ... win_get_file_attrs(const char path[])
1212 1209 } }
1213 1210 } }
1214 1211
1215 utf16_path = utf8_to_utf16(path);
1216 attr = GetFileAttributesW(utf16_path);
1212 wchar_t *utf16_path = utf8_to_utf16(path);
1213 if(utf16_path == NULL)
1214 {
1215 return INVALID_FILE_ATTRIBUTES;
1216 }
1217
1218 DWORD attr = GetFileAttributesW(utf16_path);
1217 1219 free(utf16_path); free(utf16_path);
1218 1220
1219 1221 return attr; return attr;
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master