Revert "Merge pull request #30 from BeauSLM/fix_directory_behaviors"
This reverts commitremotes/origin/HEADdd5bc12769, reversing changes made to683b422944.
parent
607daa4a40
commit
1a39187841
|
|
@ -33,7 +33,7 @@ end
|
||||||
---Performing common file operation tasks
|
---Performing common file operation tasks
|
||||||
---@param op string rename|duplicate|new|newFromSel
|
---@param op string rename|duplicate|new|newFromSel
|
||||||
local function fileOp(op)
|
local function fileOp(op)
|
||||||
local dir = fn.getcwd()
|
local dir = expand("%:p:h")
|
||||||
local oldName = expand("%:t")
|
local oldName = expand("%:t")
|
||||||
local oldFilePath = expand("%:p")
|
local oldFilePath = expand("%:p")
|
||||||
local oldNameNoExt = oldName:gsub("%.%w+$", "")
|
local oldNameNoExt = oldName:gsub("%.%w+$", "")
|
||||||
|
|
@ -96,7 +96,7 @@ local function fileOp(op)
|
||||||
-- DETERMINE PATH AND EXTENSION
|
-- DETERMINE PATH AND EXTENSION
|
||||||
local hasPath = newName:find("/")
|
local hasPath = newName:find("/")
|
||||||
if hasPath then
|
if hasPath then
|
||||||
local newFolder = vim.fs.dirname(newName)
|
local newFolder = newName:gsub("/.-$", "")
|
||||||
fn.mkdir(newFolder, "p") -- create folders if necessary
|
fn.mkdir(newFolder, "p") -- create folders if necessary
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue