#assessing app config dir

6 messages · Page 1 of 1 (latest)

sacred cedar
#

Hey, I am trying to write a file to $AppConfig but when I am trying to access the directory in wich the file should be created it dose not exist. I fixed it on Linux by adding the path dev.tauri.com to the .config in my home folder. But how do I fix it on windows and in production? And is this a bug?

south pasture
#

you need to create the folder first. there's a createDir api for that

#

and if the missing folder is the problem then it's not a bug

sacred cedar
#

Yes that’s the problem. But I don’t know how I should create the folder because I have not root directory. This was always my AppConfig.

south pasture
#

i may be missing the point but what i think you have to do is just this: ```ts
await createDir(await appConfigDir());

#

(or create_dir_all(app_config_dir()) in rust if that's what you use)