Re: Filesel dnd patch



On Wed, 29 Aug 2001, Darin Adler wrote:

> On Wednesday, August 29, 2001, at 01:32  PM, Alex Larsson wrote:
> 
> > Now, consider if you navigate to /etc in gmc, and then drag the "passwd"
> > file and drop it on the fileselector. The uri passed here is
> > file://a/etc/passwd, and the fileselector has two options. Either select
> > /etc/passwd on the local machine (which is probably a different file), or
> > bail out, saying that it was a non-local file.
> 
> You loaded the deck by choosing "/etc/passwd", a file that has the same 
> location and meaning on every machine. There are a lot of files that don't 
> have the same location on every machine.

Well. That is the interesting case. If the file didn't exist locally the 
file selector would just complain that the file/directory didn't exits.

Note that it i meant would be bad to select the wrong /etc/passwd, but it 
might be bad to refuse it because in a lot of cases it is right.
 
> Perhaps I'm too accustomed to systems where you can put files wherever you 
> want. I guess that on Unix, the number of files that have the same path on 
> every machine is large, making the behavior of opening a file with the 
> same path on a different machine sometimes useful.

It is generally usefull when you're NFS mounting your home directory. 

In general, unix has traditionally been administred by a sys admin, and 
each box NFS mounts the /home filesystem. So, when I'm sitting on my 
workstation i can log in on the compile server to compile, while still 
editing my code locally. Me being a user, i only manage files in my 
home directory, and since those are shared between all the boxes i can log 
in to, in essence all the files i use are shared. So in most real cases of 
drag and drop between windows on different machines they actually 
correspond to the same file.

This is changing though. A lot of people are using linux in a more stand 
alone fashion, where you sysadmin your own box. In this environment drag 
and drop between different machines is a bit more "unsafe", since they 
generally don't share any filesystems.
 
> But what about when the two machines don't share their home directories 
> using NFS? And you have files in your home directory with the same name, 
> but different contents, on the two machines. On example would be when I'm 
> trying to edit two of my .cvsrc files on the two machines to reconcile 
> differences between them.

Yeah. What about it. Is it bad to select the other .cvsrc? I guess it is, 
because the non-technical user wouldn't understand that it was a 
different file, and therefore be confused.

> Note that I asked if using the path and ignoring the hostname was OK. I 
> didn't make a specific suggestion of what to do instead. Your suggestion 
> of "bailing and refusing to handle the 'non-local' file" would not be my 
> first choice.

That is what the current patch does.

But i think the real solution is to pop up a dialog saying something like. 

  This file resides on another machine, and may not be availible to this
  program. Are you sure you want to select it?

  [Yes] [No]

Or something like that.

/ Alex







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]