File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ local handle_image_url = function(url)
2020
2121 -- mkdir if not exists
2222 local dir_path = vim .fn .fnamemodify (file_path , " :h" )
23- local dir_ok = fs .mkdirp (dir_path )
24- if not dir_ok then
23+ if not fs .mkdirp (dir_path ) then
2524 util .error (" Could not create directories." )
2625 return false
2726 end
@@ -59,15 +58,13 @@ local handle_image_path = function(path)
5958 if file_path then
6059 -- mkdir if not exists
6160 local dir_path = vim .fn .fnamemodify (file_path , " :h" )
62- local dirs_created = fs .mkdirp (dir_path )
63- if not dirs_created then
61+ if not fs .mkdirp (dir_path ) then
6462 util .error (" Could not create directories." )
6563 return false
6664 end
6765
6866 -- copy image to specified file path
69- local copy_ok = fs .copy_file (path , file_path )
70- if not copy_ok then
67+ if not fs .copy_file (path , file_path ) then
7168 util .error (" Could not copy image." )
7269 return false
7370 end
You can’t perform that action at this time.
0 commit comments