mirror of
				https://github.com/folke/lazy.nvim.git
				synced 2025-10-30 22:11:09 +00:00 
			
		
		
		
	fix(cache): normalize paths
This commit is contained in:
		
					parent
					
						
							
								bb1c2f4c3e
							
						
					
				
			
			
				commit
				
					
						62c1542141
					
				
			
		
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -99,6 +99,7 @@ end | |||
| ---@param modpath string | ||||
| ---@return any, string? | ||||
| function M.loadfile(modpath) | ||||
|   modpath = modpath:gsub("\\", "/") | ||||
|   return M.load(modpath, modpath) | ||||
| end | ||||
| 
 | ||||
|  | @ -106,6 +107,7 @@ end | |||
| ---@param modpath string | ||||
| ---@return function?, string? error_message | ||||
| function M.load(modkey, modpath) | ||||
|   modpath = modpath:gsub("\\", "/") | ||||
|   local hash = M.hash(modpath) | ||||
|   if not hash then | ||||
|     -- trigger correct error | ||||
|  | @ -167,6 +169,7 @@ function M.get_rtp() | |||
|       end | ||||
|     end | ||||
|     for _, path in ipairs(vim.api.nvim_list_runtime_paths()) do | ||||
|       path = path:gsub("\\", "/") | ||||
|       if not skip[path] then | ||||
|         M.rtp[#M.rtp + 1] = path | ||||
|       end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue