Skip to main content
Known Participant
May 13, 2019
解決済み

window.cep.fs.makedir Fails With UNC Path on Windows

  • May 13, 2019
  • 返信数 2.
  • 1118 ビュー

Hi all,

I develop InDesign CC Extensions.

I have used window.cep.fs.makedir() frequently with no problem. However, I was always using Windows paths ("c:\mydir\myfile.txt") - of course with "\" converted to "/".

For the first time, I have to deal with UNC paths ("\\myhost\myshare\mydir\). window.cep.fs.makedir is failing at creating new dirs with UNC paths (regular Windows paths work fine). writefile and readfile both work fine with UNC.

For example, window.cep.fs.makedir('//myhost/myshare/mydir/newdir') fails, even though '//myhost/myshare/mydir/' exists already.

Could someone please help me?

TIA,

mlavie

このトピックへの返信は締め切られました。
解決に役立った回答 mslavie

Solved.

For whatever reason, on Windows, window.cep.fs.makedir wants backslashes ("\") instead of slashes ("/").

Go figure.

mlavie

返信数 2

Inspiring
December 9, 2020

That could be a bit offtopic, but how did you manage to handle windows paths? The `onEncoderJobComplete` path callback in Windows it s the one with single `\` which blocks me from reading the file after the encoder is done. Thank you

mslavie
mslavie解決!
Participant
May 16, 2019

Solved.

For whatever reason, on Windows, window.cep.fs.makedir wants backslashes ("\") instead of slashes ("/").

Go figure.

mlavie