[Scilab-users] ?==?utf-8?q? scilab mkdir and UNC path support

Antoine Monmayrant amonmayr at laas.fr
Tue Oct 30 16:09:21 CET 2018


Hello Samuel,

Well, pathconvert does not help much here (it does not change a single char to my unc path).
But anyway, it's a dead end for me: in addition to some assumptions in mkdir() that are not true with unc path, mkdir() calls a hard coded function (createdir) that I am not able to modify.
One of the issue with createdir is that it tries to determine whether a path is a local or a global one: its logic is failing with a unc path...

Too bad,

Antoine
 
 
Le Lundi, Octobre 29, 2018 19:40 CET, Samuel Gougeon <sgougeon at free.fr> a écrit: 
 
> Le 29/10/2018 à 16:17, Antoine Monmayrant a écrit :
> > Hi all,
> >
> > The lack of support for UNC path in scilab is a real issue in our lab (UNC path are Windows paths that looks like \\server\dir1\subdir1\).
> > In particular it breaks atomsInstall for all the Windows users here as our home dir is mounted as a UNC path: \\servername\username.
> > I found the main issue (I think) in mkdir() at line 88:
> >      subdirs = strsplit(NewDirectory, ["/" "\"]);
> > obviously, splitting the  path to the new directory is not going to give you something nice with a UNC path that starts with "\\".
> > I have an idea to workaround this limitation, but there is still something I don't get in the logic of mkdir(): this splitting is associated with "bAddFirstDirSep", a variable that tries to detect something wrong with the first directory separator.
> > Could anyone more knowledgeable than me explain why it is there and what is is doing?
> > I would not want to reintroduce some bug with my modified version...
> 
> On windows, we have
> --> pathconvert("c:\",%f,%t,"u")
>   ans  =
>   /cygdrive/c
> 
> I don't know what we might do with this. There is no cygdrive on my 
> computer (AFAIK :/)
> 
> Conversely, could you try something like
> --> pathconvert(your_slashslash_path, %f, %t, "w")
> 
> Samuel
> 
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>




More information about the users mailing list