Skip to content

Commit

Permalink
fix folder path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
samlhuillier committed Nov 23, 2024
1 parent 39edb94 commit bd3a4bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/File/NewDirectory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button } from '@material-tailwind/react'
import posthog from 'posthog-js'

import ReorModal from '../Common/Modal'
import { getInvalidCharacterInFileName } from '@/lib/file'
import { getInvalidCharacterInFilePath } from '@/lib/file'
import { useFileContext } from '@/contexts/FileContext'

interface NewDirectoryComponentProps {
Expand Down Expand Up @@ -50,7 +50,7 @@ const NewDirectoryComponent: React.FC<NewDirectoryComponentProps> = ({ isOpen, o
}, [isOpen])

const handleValidName = async (name: string) => {
const invalidCharacters = await getInvalidCharacterInFileName(name)
const invalidCharacters = await getInvalidCharacterInFilePath(name)
if (invalidCharacters) {
setErrorMessage(`Cannot put ${invalidCharacters} in file name`)
return false
Expand Down

0 comments on commit bd3a4bb

Please sign in to comment.