Just wasted ~6 hours just on this and had to restart my PC 2 times…
Simplified example:
const temp = (await storage.localFileSystem.getTemporaryFolder()).nativePath
const data = (await storage.localFileSystem.getDataFolder()).nativePath
const plugin = (await storage.localFileSystem.getPluginFolder()).nativePath
console.log(temp) // C:\users\...\temp\...\PluginData
console.log(data) // C:\users\...\Roaming\...\PluginData
console.log(plugin) // C:\path\to\plugin\
Notice the trailing backslash on the plugin
result
Then trying to get fs.lstatSync(plugin)
completely froze Photoshop and couldn’t even kill the process. Took some restarts at the end of debugging to finally pin-point the problem
Don’t know if it’s just Windows issue or MacOS also, but that’s not how APIs should behave
Posting here if someone runs into this…