Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: Eli Zaretskii , djgpp AT delorie DOT com Date: Mon, 4 May 1998 11:20:04 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: fixpath problem in Novell drives. References: In-reply-to: Precedence: bulk Eli Zaretskii wrote: > > I can workaround it, but the strange name comes just from _truename. > > File names produced by _truename are not meant to be used as arguments to > other file-oriented library functions, precisely for this reason. Use > _fixpath if you need to pass the generated name to other functions. > _truename's primary purpose is to produce names which can be reliably > *compared* to other names, for example to decide whether two different > names actually refer to the same file. That's why I call truename, the editor can't open twice the same file (can but is a mess so avoid it). So I pass the name provided by the user to truename (only when LFN=N) and as the result is ugly I then pass it to fixpath. > If you have no choice but to use what _truename returns, you must do some > additional work to map the leading \\SERVER\PATH part back to the X:\ > form. The usual way to achive that is to call _truename with "X:\" and > look at what it returns. Then you can combine the results of _truename > and _fixpath to a full name with a drive letter. > > > We must take a look to the Novell's API, I guess is possible to know the name > > belongs to an attached server. > > If you find a way to get this info from Novel API calls, please tell me. > I've looked several times for such a service, but in vain. It seems that > Novell redirector keeps this information internally but doesn't allow it > to be easily accessed. > > > I'm just making: truename and then fixpath. The first to avoid problems in DOS > > when the user saves a file like this: "123456789.123". truename cuts the "9" > > but as a side effect converts the name in all upper case + back slashes, so I > > pass it to fixpath. Of course I'll just replace fixpath by my own function, but > > is a bad thing. > > Using the trick above with passing X:\ to _truename, I think you can do > it more easily. But I agree that it's a mess. I just don't know any > good way out of it. Ok, I'll make some tests, perhaps I'll just replace fixpath for a simple routine that assumes that \\ must be preserved. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://set-soft.home.ml.org/ or http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013