Apple/Mac Appending to File path?
I have the following javascript script runnning in InDesign:
if (File.fs == "Windows") {
var defaultPath = new File('\\\\server\\path\\to\\file');
} else {
var defaultPath = new File('smb://server/path/to/file');
}
The code works fine in Windows (the file is on a Windows shared directory), but on a Mac I get a "cannot find folder" error and claims the defaultPath variable is:
/Applications/Adobe InDesign CS5/scripts/XHTML For Digital Editions/smb:/server/path/to/file
I am confused about 2 things:
- Why is it appending "/Applications/Adobe InDesign CS5/scripts/XHTML For Digital Editions/" to the path?
- Why is it changing smb:// to smb:/ (one forward-slash) ?
Am I using the wrong path for Mac? Is there supposed to be something else before smb:// to identify that it is not a local path?