On my Windows machine, the getFolder function returns the complete path in the “name” variable. Is this different on a Mac? I just saw that when my plugin is tested on a Mac, only the folder name itself is returned in the “name” variable. Can this be true? Should “nativepath” be used instead?
If so, shouldn’t that be unified for Windows and Mac?
Can somebody on a Mac check this for me please? Unfortunately I haven’t got one and this issue seems to be the reason why my plugin is stuck in the approval process.
Hi Andreas, looks like you’re right, on macOS the nativePath is different to name
1 Like
Cheers, Ben. That’s a great help.
@kerrishotts Can you please fix that for Windows or at least sync between the two OS’s? Otherwise it’s hard to predict how a plugin will act on a different OS.
1 Like
Perhaps you should consider detecting the user’s operating system and adapt the path accordingly
const hostOS = require('os').platform();`
if (hostOS == "darwin") {
// We're on Mac
} else {
// We're on PC
}
1 Like
As the full path is what I need and “nativePath” seems to work the same on both OS’s, there’s no need for that.
I like that “name” and “nativePath” deliver different results, otherwise this would be redundant. Considering that, the Windows return value for “name” should be fixed as it actually delivers the path.
1 Like