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 3d5c7470f73475851c6a93cdc4c7ec6d9ea2d75a

Don't report Directory is not writable
when ACLs are not supported. Also fix buffer overrun in _wgetcwd
Author: Sergei Khorev
Author date (UTC): 2026-11-13 16:15
Committer name: Sergei Khorev
Committer date (UTC): 2026-11-13 16:15
Parent(s): 12629c71f5f959583a18e837d955ea9bc4f52988
Signing key:
Tree: 05100e9ae4ba0bc51244474fc9fcc4217da5542e
File Lines added Lines deleted
src/compat/os.c 1 1
src/utils/fs.c 20 1
File src/compat/os.c changed (mode: 100644) (index 8ef97d5a2..a27867eb3)
... ... os_getcwd(char buf[], size_t size)
321 321 { {
322 322 char *utf8_buf; char *utf8_buf;
323 323 wchar_t wbuf[size]; wchar_t wbuf[size];
324 if(_wgetcwd(wbuf, sizeof(wbuf)) == NULL)
324 if(_wgetcwd(wbuf, size) == NULL)
325 325 { {
326 326 return NULL; return NULL;
327 327 } }
File src/utils/fs.c changed (mode: 100644) (index 541295851..d079d6aca)
... ... is_dir_writable(const char path[])
403 403 if(ret != ERROR_SUCCESS) if(ret != ERROR_SUCCESS)
404 404 { {
405 405 LOG_ERROR_MSG("Failed to get security info"); LOG_ERROR_MSG("Failed to get security info");
406 LOG_WERROR(GetLastError());
406 LOG_WERROR(ret);
407
408 /* Some network shares (NAS, Samba, etc.) don't support security
409 * descriptors, so ACLs tell nothing. Fall back to checking that the path
410 * is a directory and let the actual operation report real errors.
411 * FILE_ATTRIBUTE_READONLY on a directory doesn't prevent creating files in
412 * it (it's often set on share roots), so it's ignored. */
413 if(ret == ERROR_NOT_SUPPORTED || ret == ERROR_INVALID_FUNCTION ||
414 ret == ERROR_CALL_NOT_IMPLEMENTED)
415 {
416 wchar_t *utf16_path_fb = utf8_to_utf16(path);
417 if(utf16_path_fb == NULL)
418 {
419 return 0;
420 }
421 const DWORD attrs = GetFileAttributesW(utf16_path_fb);
422 free(utf16_path_fb);
423 return attrs != INVALID_FILE_ATTRIBUTES &&
424 (attrs & FILE_ATTRIBUTE_DIRECTORY);
425 }
407 426 return 0; return 0;
408 427 } }
409 428
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