Not gettting right pwd
only shows up to
C:\Users\JohnStoober\
when I am really in
C:\Users\JohnStoober\Repos\project\
am I doing something wrong?17 Replies
how do you know you're really in that directory?
if you create a file in the program, where does it end up?
lemme see
wait, what would I use as the path?
nothing
just a name of a file
(spoiler: the thing you're doing wrong is almost definitely incorrectly assuming your PWD is something that it isn't)
File.Create()
requires a path as argyes, so use a relative path
which can be just the name of a file
o
k
it ends up in what the program thinks is my pwd
then that is 100% your pwd
i can't tell you why, it depends on how you're running your program and any other code that may be setting your current directory
im in
C:\Users\JohnStoober\Repos\project\
, even my shell says sowell, your program doesn't say so
so, any way I can perhaps fix this?
i mean, it's not broken
you need to figure out what about your environment/configuration is setting the PWD to something you don't want
im almost sure it is; the $pwd variable points to my presumed current directory
hmm
the core filesystem APIs in .NET are broken?
ok
which is more likely, that or something else 😛
maybe I just downloaded a corrupted version
wait no thats not it
hmmm, what could this be…
this is so odd
How are you running your program