#6793 Fix file, folder renaming issues (#6869)

* fix going into rename mode for files with parents

* lastDirectoryClicked is not used

* fix file/folder rename bugs: renaming within folders

* Turn form into div to fix issue of child renaming continues into renaming the parent folder when hitting enter

* ContextMenu stopPropagation not needed anymore, maybe because of form refactor

* ContextMenu IS needed actually, with multiple nested folders

* make lint happy

* Update src/components/ContextMenu.tsx

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>

* re-add <form> instead of <div> for file renaming

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
This commit is contained in:
Andrew Varga
2025-05-12 21:59:10 +02:00
committed by GitHub
parent 566c9eaf10
commit 1a8f80a7dc
4 changed files with 41 additions and 19 deletions

View File

@ -273,11 +273,11 @@ export const FileMachineProvider = ({
: newName + FILE_EXT
: DEFAULT_FILE_NAME
const oldPath = window.electron.path.join(
input.selectedDirectory.path,
input.parentDirectory.path,
oldName
)
const newPath = window.electron.path.join(
input.selectedDirectory.path,
input.parentDirectory.path,
name
)