Mantis - Squeak
Viewing Issue Advanced Details
1669 Tools minor always 08-12-05 20:05 03-01-06 21:51
ned  
ned  
normal  
feedback  
reopened  
none    
none 3.9  
0001669: [ENH] DropFilesOnArchiveViewer-as-nk
"Change Set: DragAndDropToArchiveViewer
Date: 31 October 2003
Author: Adam Spitz
Edited Date: 21 April 2004
Edited By: Ned Konz

Lets you drag-and-drop from the File List to the Archive Viewer.

Original code by Adam Spitz.

Ned Konz changed it to:

* accept dropping of directories too (possible from a FileList).

* remove any leading path components that are shared with the default
directory (also for 'add directory' button).

That is (assuming the default directory is '/home/ned/Squeak'):

- if you drop a file named: '/home/ned/Squeak/xyz/abc' the resultant
file will be called 'xyz/abc'.
- if you drop a directory named: '/home/ned/Squeak/xyz/abc' containing a
file named 'def' then the resultant file will be called 'xyz/abc/def'.
- if you drop a directory named: '/home/ned/xyz/abc' containing a file
named 'def' then the resultant file will be called 'xyz/abc/def'.
- if you drop a directory named: '/abc' containing a file named 'def'
then the resultant file will be called 'abc/def'.

"
 DropFilesOnArchiveViewer-as-nk.cs.gz [^] (2,828 bytes) 08-12-05 20:05
 DropFilesOnArchiveViewer-as-nk.2.cs.gz [^] (2,629 bytes) 03-01-06 21:51

Notes
(0002317)
KenCausey   
08-12-05 20:13   
Jason Rogers <jacaetevha@fast-mail.org>:

"> That is (assuming the default directory is '/home/ned/Squeak'):
> ...
> - if you drop a directory named: '/home/ned/Squeak/xyz/abc' containing a
> file named 'def' then the resultant file will be called 'xyz/abc/def'.
> - if you drop a directory named: '/home/ned/xyz/abc' containing a file
> named 'def' then the resultant file will be called 'xyz/abc/def'.
> ...

Are these two correct? I would think that you would end up with these
two files in the archive:

1. /home/ned/Squeak/xyz/abc/def
2. /home/ned/xyz/abc/def"
(0002318)
KenCausey   
08-12-05 20:17   
Ned Konz <ned@bike-nomad.com>:

"That's the way it is now. Do you think it should be some other way? The
previous behavior of 'add a directory' was to strip off the directory name
(thereby flattening it); if you added the same directory named
'/home/ned/Squeak/xyz/abc' containing a file named 'def' then the resultant
file would have been called 'abc/def'. A file called
'/home/ned/Squeak/xyz/ghi.jkl' would have been called 'ghi.jkl'.

But I found that when building SAR files manually that it was more useful to
make 'subdirectories' to help organize things. This way if you were unzipping
it somewhere the files wouldn't end up all in the same directory.

> I would think that you would end up with these
> two files in the archive:
>
> 1. /home/ned/Squeak/xyz/abc/def
> 2. /home/ned/xyz/abc/def

First, you should *never* have absolute paths in a Zip file. Not only is this
against the spec, it's a bad idea for security reasons (though I suspect most
Zip programs ignore the leading slash anyway).

Second, I'm trying to provide the most useful behavior here. Since zips are
used to move files between systems (like the SAR and the project format in
Squeak, for instance), absolute paths to places on my system aren't too
important."
(0002319)
KenCausey   
08-12-05 20:20   
denker@iam.unibe.ch:

"The changeset DropFilesOnArchiveViewer-as-nk.cs has conflicts with later
changes.


Checking DropFilesOnArchiveViewer-as-nk.cs (0005878) for method conflicts
with changesets after 5878hScrollbarFixes2-sps ...
...checking ArchiveViewer>>addMember
...checking ArchiveViewer>>createButtonBar
CONFLICT found for ArchiveViewer class>>createButtonBar with newer
changesets 5994-004-systemMod 6003-1007mergeJul2 6023-3021misc
6111-0290fontMenuFixes-nk 6222MoreWindowColorFixes-nk
...checking ArchiveViewer>>addDirectory
...checking ArchiveViewer>>memberMenu:shifted:
CONFLICT found for ArchiveViewer class>>memberMenu:shifted: with newer
changeset 5948ServicesArchiveViewer-nk
...checking Archive>>addTree:removingFirstCharacters:
2 conflicts found."
(0002320)
KenCausey   
08-12-05 20:23   
I loaded this into 3.8-6665-basic without errors but did not test further.
(0004059)
MarcusDenker   
02-24-06 21:21   
rejected: conflicts indicated, original author did not respond --> seems to be unimportant. closed
(0004271)
ned   
03-01-06 21:27   
I looked over the change set and resolved the conflicts appropriately for the 3.8 image. Should be OK now.