fix(ftp): give oil-ftps:// its own adapter name to prevent scheme clobbering
Problem: both oil-ftp:// and oil-ftps:// mapped to the adapter name
'ftp', so config.adapter_to_scheme['ftp'] was set to whichever scheme
pairs() iterated last — non-deterministic. init.lua uses
adapter_to_scheme[adapter.name] to reconstruct the parent URL, so
roughly half the time it injected 'oil-ftps://' into ftp:// buffer
navigation, causing the ssl-reqd error on '-' press.
Solution: register oil-ftps:// under adapter name 'ftps' via a
one-line shim that returns require('oil.adapters.ftp'). Now
adapter_to_scheme['ftp'] = 'oil-ftp://' and
adapter_to_scheme['ftps'] = 'oil-ftps://' are both stable.
This commit is contained in:
parent
b7f475787e
commit
7274c9de46
2 changed files with 2 additions and 1 deletions
1
lua/oil/adapters/ftps.lua
Normal file
1
lua/oil/adapters/ftps.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return require('oil.adapters.ftp')
|
||||
Loading…
Add table
Add a link
Reference in a new issue