delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/23/17:52:29

Message-ID: <326EACCC.22@gbrmpa.gov.au>
Date: Thu, 24 Oct 1996 07:39:57 +0800
From: Leath Muller <leathm AT gbrmpa DOT gov DOT au>
Reply-To: leathm AT gbrmpa DOT gov DOT au
Organization: Great Barrier Reef Marine Park Authority
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: djgpp AT delorie DOT com
Subject: Re: LFN under W95 (longish)
References: <Pine DOT SUN DOT 3 DOT 91 DOT 961023094933 DOT 6813T-100000 AT is>

> > Read the documentation for W95 LFN handling.  The problem is that files
> > under W95 have TWO names each.  You can refer to it with either name.
> > This is the reason the default numeric tail value is 1, so the short names
> > are always messed up and pretty useless (but don't conflict either).  If you
> > don't ever use any LFN unaware programs, leave the numeric tail value in
> > the registry as it is shipped.
 
> The above happens even when NameNumericTail is left at its default value
> of 1.  So even users who don't change the registry at all will hit this
> problem.

I never play with the registry, and it gets screwed a lot. I simply keep
a
copy of my old registry in backup form on another drive... :) But I
never
have had the problem you are talking about...well, never noticed it
anyway...
 
> Btw, Windows doesn't mess up the filenames which use all the 8+3
> characters; they just have identical long and short names (except, maybe,
> for the case, if you cared to rename them).  This is true even if
> NameNumericTail is 1.

I experimented a lot last night...see below...
 
> > You have an expectation which file names will match one to one which isn't
> > correct under W95 - the example above is how I EXPECT W95 to behave, since
> > I have been messing with it since 1994 betas...  It isn't unix.
 
> It is still wrong IMHO to rename only one part of the filename.  If a
> file can be referenced by any of the two names, they both should be
> changed when the file is renamed.  Otherwise, if you reference the file
> by the wrong name, it was not renamed.

I think that when you are programming (this is IMHO) you should decide
if
your going to use either LFN or not...if your not, chose different short
filenames, otherwise, use different long ones. It just seems logical to
me
that you shouldn't _mix_ the two to start with, which is why W95
probably
screwes up the short filename, expecting you to use long filenames all
the
time, not just some of the time...
 
> > I would argue that programs that do the above rename and expect them to
> > be unique are broken under W95 and should be changed to use a ".extension"
 
> How is it broken to rename a file and expect it to change its name?

Basically, I tested everything I could think of, rename, save as, save,
etc
etc...

I created a file with vi:
	vi test.aaa
I copied test.aaa to test.aaa~ and got
	test~1.aaa
I edited the test.aaa file
	edit test.aaa
and saved as testtest.aaa
	alt -> file -> save-as -> testtest.aaa
and had three files:
	test.aaa
	test~1.aaa
	testtest.aaa
I then edit the file testtest.aaa, and saved as
	testtest.aaa~
and got
	test.aaa
	test~1.aaa
	testtest.aaa
	testte~1.aaa

I did this sort of thing for ages, and nothing broke. I even tried:
	edit test.aaa
and saved as
	test.aaab
and renamed test.aaab to test.aaac, and had the following list:
	test.aaa
	test~1.aaa
	testtest.aaa
	testte~1.aaa
	test~2.aaa
It updated everything properly.

Maybe you have an old version of Win95 Eli? Or something, because I
can't seem to reproduce your error. Your exact example from your post
didnt break either... :|

Leathal.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019