Opened 6 years ago

Last modified 5 years ago

#9641 new Bug report

move directory not behaving as expected when destination directory contains like-named directory

Reported by: StevenANebeker Owned by:
Priority: normal Component: FileZilla Client
Keywords: Cc: ammeannio@…
Component version: Operating system type:
Operating system version:

Description

When moving a directory to a destination directory which contains a like-named directory, the directory you intend to move is placed inside the like-named directory instead of being merged with it.

Change History (7)

comment:1 Changed 6 years ago by Tim Kosse

Status: newmoreinfo

Please describe in more detail where you are dragging from and where you are dragging to.

In addition, which version of FileZilla are you using?

comment:2 Changed 6 years ago by StevenANebeker

Status: moreinfonew

FileZilla version 3.7.3

User is in the following remote directory:
/httpdocs/new

The above mentioned directory has some directories and files; to simplify, let's say it has one directory, "images", and one file, "tree.html"

User highlights the "images" directory and "tree.html" file; user drags these to ".."

For the sake of simplicity, let's say the "images" directory contains a single image, "flower.jpg" ... instead of "flower.jpg" being placed into the existing /httpdocs/images directory, it is placed into /httpdocs/images/images (the "images" directory is not merged but instead made a subdirectory of the like-named directory at the destination)

Here's how things are before the user does anything:
/httpdocs
/httpdocs/images
/httpdocs/images/grass.jpg
/httpdocs/new
/httpdocs/new/images
/httpdocs/new/images/flower.jpg
/httpdocs/new/tree.html

Here's how I would EXPECT things to be after the user takes the action I described above:
/httpdocs
/httpdocs/images
/httpdocs/images/grass.jpg
/httpdocs/images/flower.jpg
/httpdocs/new
/httpdocs/tree.html

Here's the ACTUAL RESULT of things after the user takes the action I described above:
/httpdocs
/httpdocs/images
/httpdocs/images/grass.jpg
/httpdocs/images/images
/httpdocs/images/images/flower.jpg
/httpdocs/new
/httpdocs/tree.html

Please let me know if further explanation is required.

comment:3 Changed 6 years ago by Tim Kosse

This is a common idiom of Unix-like operating systems. Moving (aka renaming) a directory to an already existing target moves the directory into the target directory instead of replacing it.

mkdir foo
mkdir bar
cd bar
mkdir foo
mv foo ../foo
[ -d ../foo/foo ] && echo "works as expected"

comment:4 Changed 6 years ago by StevenANebeker

How about if FileZilla detects this type of circumstance and then mv's the files contained within the directory instead?

comment:5 Changed 6 years ago by Tim Kosse

Might be very confusing for users expecting Unix-like move semantics on Unix-like servers.

comment:6 Changed 6 years ago by StevenANebeker

I use a Unix-like system on my personal computer ... the graphical file manager and other utilities do not behave in the same way as the command line in this respect. I doubt that a typical user expects a high level graphical interface to maintain the idiosyncrasies of the mv command. Many users don't know or care what's going on in the background at a lower level, they just expect it to do what they want.

comment:7 Changed 5 years ago by ammeannio

Cc: ammeannio@… added
Note: See TracTickets for help on using tickets.