create_and_notify behavior on invalid new files #2330
Unanswered
learner-long-life
asked this question in
Q&A
Replies: 1 comment
-
This definitely isn't valid operation, but error message could be improved. Don't think we can/want to do any validation in user prompt. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue:
Confusing error message when creating a new path that assumes some directories that are actually files.
Details:
Ahoy, I was trying to create a new directory with nvim-tree and accidentally created a new file instead. Afterwards, creating a new file in this not-a-directory fails with a confusing error message.
Steps To Reproduce:
nvim
C-n
to opennvim-tree
a
to add a file in current directory, saymath
a
again to add another new file, saymath/Blah.scala
(nvim
doesn't let you auto-complete this, but also doesn't stop you from adding a/
to any path)While this behavior is correct, as
math
is not a directory, the error message could be clearer in thisnvim-tree
functionFor some reason, trying to create a file like this returns
ok
frompcall
and doesn't return, making it down to the linevim.loop.fs_close
. Suggestions or improvements? Not a big enough issue?If you try to create any other path that doesn't exist, it appears to perform the equivalent of
mkdir -p
, that is, creating./clojure/lalaland/MathUtils.scala
will work beautifully and create the directories./clojure
and./clojure/lalaland
automatically.Thanks.
Beta Was this translation helpful? Give feedback.
All reactions