Commit graph

37 commits

Author SHA1 Message Date
c6b4a7a07b
feat: add configurable file and directory creation permissions
Problem: files were always created with mode 0644 and directories
with 0755, hardcoded in fs.touch and uv.fs_mkdir. Users who need
different defaults (e.g. 0600 for security) had no config option.

Solution: add new_file_mode (default 420 = 0644) and new_dir_mode
(default 493 = 0755) config options, passed through to fs.touch and
uv.fs_mkdir in the files and mac trash adapters. The fs.touch
signature accepts an optional mode parameter with backwards
compatibility (detects function argument to support old callers).
Local cache directories (SSH, S3) continue using standard system
permissions rather than the user-configured mode.

Based on: stevearc/oil.nvim#537
2026-02-20 20:26:07 -05:00
Steven Arcangeli
81b8a91735 cleanup: remove deprecated trash_command 2026-01-01 00:22:58 -05:00
Muhammad Imaduddin
634049414b
fix: open files under cwd with relative name (#693) 2025-12-29 10:15:58 -08:00
Steven Arcangeli
ba1f50a9a8 fix: file time column escapes ()[] chars in parser (#603) 2025-03-30 15:14:11 -07:00
Steven Arcangeli
d7c61c7084 fix: silent handling when buffer has no oil adapter (#573) 2025-03-04 12:57:01 -08:00
Steven Arcangeli
5313690956 fix: more robust parsing of custom column timestamp formats (#582) 2025-02-12 22:12:24 -08:00
Steven Arcangeli
09fa1d22f5
fix: work around incorrect link detection on windows (#557)
* fix: work around incorrect link detection on windows

* fix: gracefully handle lstat error on windows
2025-01-13 10:22:59 -08:00
Steven Arcangeli
7c26a59ac0
fix: gracefully handle fs_stat failures (#558)
* fix: gracefully handle fs_stat failures

* fix: make log methods safe to call in luv callbacks

* fix: replace another vimscript call
2025-01-12 14:29:46 -08:00
Benedict Ozua
7041528bde
fix: support permissions checks on windows and virtual filesystems (#555)
* use access(2) over file permission checks to workaround systems that change expected file permission view

* cleanup: delete unused function

---------

Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
2025-01-07 21:04:25 -08:00
Steven Arcangeli
254bc6635c fix: guard against nil metadata values (#548) 2025-01-04 12:52:26 -08:00
Steven Arcangeli
c6a39a69b2 fix: stat files if fs_readdir doesn't provide a type (#543) 2025-01-03 11:55:50 -08:00
Steven Arcangeli
1f7da07a3e refactor: remove overcomplicated meta_fields abstraction
This abstraction is overly generic for what it does. It's only ever used
to help us conditionally perform a fs_stat for the local files adapter.
We can replace that with a much dumber, much simpler bit of logic.
2025-01-03 11:55:50 -08:00
Steven Arcangeli
1360be5fda lint: stricter type checking 2024-09-17 13:00:48 -07:00
Steven Arcangeli
b05374428e fix: wrap git rm callback in schedule_wrap (#475) 2024-09-10 11:44:15 -07:00
DerpDays
65c53dbe4f
fix: correctly check group permissions in unix (#428)
* fix: set modifiable when user in group

* feat: add mode caching, fallback to previous, and better checking of permissions

* fix: make is_modifiable check group permissions even if the user is owner of the directory

* refactor: simplify group ID caching

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-06-21 09:07:03 -04:00
Steven Arcangeli
3283deec96 lint: ignore some type errors 2024-05-13 20:02:11 -06:00
Matthew Wilding
f3a31eba24
fix(windows): navigating into drive letter root directories (#341)
* Fixed drive browsing on windows

* Fixed naming

* fix: Uppercase drive letter only

* updated: Filter out network drives on windows

* Update files.lua

* Update files.lua

* fixed: mapped drives

* addslash to check for double slash

* Fixed indents

* Reverted addslash change

* Fixed windows initial buffer name

* Reverted formatting

* Cleaned up callback

* Fix addslash to handle \ too

* Allow running tests workflow from fork

* Fix workflow

* Test

* Tests

* refactor: readability and comments

* fix: convert buffer name to posix when hijacking directory

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-04-23 22:06:59 -07:00
Steven Arcangeli
96f0983e75 fix(windows): file operation preview uses only backslash path separator (#336) 2024-04-23 20:57:22 -07:00
Steven Arcangeli
1f05774e1c feat: experimental support for git operations (#290) 2024-04-19 18:00:44 -04:00
Steven Arcangeli
6175bd6462
feat: trash support for linux and mac (#165)
* wip: skeleton code for trash adapter

* refactor: split trash implementation for mac and linux

* fix: ensure we create the .Trash/$uid dir

* feat: code complete linux trash implementation

* doc: write up trash features

* feat: code complete mac trash implementation

* cleanup: remove previous, terrible, undocumented trash feature

* fix: always disabled trash

* feat: show original path of trashed files

* doc: add a note about calling actions directly

* fix: bugs in trash implementation

* fix: schedule_wrap in mac trash

* doc: fix typo and line wrapping

* fix: parsing of arguments to :Oil command

* doc: small documentation tweaks

* doc: fix awkward wording in the toggle_trash action

* fix: warning on Windows when delete_to_trash = true

* feat: :Oil --trash can open specific trash directories

* fix: show all trash files in device root

* fix: trash mtime should be sortable

* fix: shorten_path handles optional trailing slash

* refactor: overhaul the UI

* fix: keep trash original path vtext from stacking

* refactor: replace disable_changes with an error filter

* fix: shorten path names in home directory relative to root

* doc: small README format changes

* cleanup: remove unnecessary preserve_undo logic

* test: add a functional test for the freedesktop trash adapter

* test: more functional tests for trash

* fix: schedule a callback to avoid main loop error

* refactor: clean up mutator logic

* doc: some comments and type annotations
2023-11-05 12:40:58 -08:00
Steven Arcangeli
57db10d748 lint: apply stylua 2023-11-05 07:29:15 -08:00
Steven Arcangeli
126a8a2346 fix: can view drives on Windows 2023-11-05 07:27:28 -08:00
Steven Arcangeli
8418e94734 fix: call vimL function in main loop (#206) 2023-10-28 11:02:05 -07:00
Steven Arcangeli
83e4d04922 fix: correctly resolve new files when selected (#179) 2023-09-18 20:48:40 -07:00
Steven Arcangeli
879d280617 feat: api to sort directory contents (#169) 2023-09-08 21:56:34 -07:00
Steven Arcangeli
e45aeebc2b types: update type annotations for LuaLS 3.7 2023-08-24 09:15:06 -07:00
Steven Arcangeli
7aeb239a6a refactor: rename supports_xfer 2023-08-20 21:50:02 +00:00
Steven Arcangeli
f4819d8b43 refactor: remove cache side effects from adapter.list 2023-08-20 21:50:02 +00:00
Steven Arcangeli
ffb89bf416 perf: tweak uv readdir params for performance 2023-08-20 18:31:17 +00:00
Steven Arcangeli
866085407f refactor: fix type annotations for adapters 2023-08-20 18:18:36 +00:00
Steven Arcangeli
8f7807946a fix: remaining type errors 2023-08-13 13:32:35 -07:00
Steven Arcangeli
47c7737618 fix: type annotations and type errors 2023-08-12 20:32:52 -07:00
Steven Arcangeli
4a4e0f4013 refactor: small perf win by eliminating string object keys 2023-06-25 22:44:44 -07:00
Steven Arcangeli
496d60fcff feat: config option for trashing deleted files (#99) 2023-05-06 21:07:01 -07:00
Steven Arcangeli
d7805c7751 feat: convert oil://path/to/file.lua to normal file path (#77) 2023-03-17 21:48:38 -07:00
Steven Arcangeli
ca4da68aae feat: builtin support for editing files over ssh (#27) 2023-01-18 10:25:22 -08:00
Steven Arcangeli
fefd6ad5e4 feat: first draft 2023-01-02 01:34:53 -08:00