Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2259 closed bug (fixed)

cp command copies BFS attributes

Reported by: shinta Owned by: emitrax
Priority: normal Milestone: R1
Component: Applications/Command Line Tools Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

When we copy some files by Tracker, the BFS attributes of its files are also copied. But, by cp command (/boot/beos/bin/cp), attributes are not copied.

I want cp command copy BFS attributes.

Haiku: hrev25524 SHINTA (enhancement No.3)

Attachments (1)

cplog.txt (587 bytes ) - added by shinta 16 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 by mmlr, 16 years ago

I'd tend to classify this as invalid. The cp command has never copied BFS attributes and IMO should not either (it's a handy way of getting rid of attributes). So this is expected behaviour. There is "copyattr -d" that copies file data and attributes and should be used to achieve attribute and data copies from the command line. But I won't decide on that, waiting for other opinions.

comment:2 by marcusoverhagen, 16 years ago

Support for attributes was added to mv and cp in hrev8401. I tested this in hrev25634 and it still works. This bug report is invalid.

I believe this behaviour is a good idea and should be kept. There is even a command line switch to disable that.

comment:3 by mmlr, 16 years ago

Resolution: invalid
Status: newclosed

Right, tested this too and it works like this. Also "--ignore-attributes" does what it is supposed to do. Closing as invalid.

by shinta, 16 years ago

Attachment: cplog.txt added

comment:4 by shinta, 16 years ago

Mmm... I tried again, but, in my hrev25628, cp doesn't work.

Above is Terminal's log. TestSrc.txt is saved by StyledEdit and has some attrs. But, after cp, TestDest.txt doesn't have attrs.

cp seem to copy icon related attributes.

comment:5 by mmlr, 16 years ago

That'd be a bug then. Are you sure you're not using a different version of cp? Can you post what "which cp" outputs and can you check if the "--ignore-attributes" argument is listed in "cp --help"?

comment:6 by shinta, 16 years ago

"which cp" returns "/bin/cp" and "--ignore-attributes" argument is listed before "-i, --interactive".

comment:7 by mmlr, 16 years ago

Resolution: invalid
Status: closedreopened
Type: enhancementbug

Then this is a bug. What filesystem does this happen on? Also it doesn't seem that you're copying between volumes or such.

comment:8 by shinta, 16 years ago

Filesystem is BFS, and, src and dest volume are same.

In Senryu distribution (VirtualBox), cp works well. It may be my problem about Haiku build.

comment:9 by emitrax, 16 years ago

What's the status of this bug? Shinta does this still happen with the latest revision? Does cp fail to copy attributes with every file? Steps to reproduce?

comment:10 by shinta, 16 years ago

I found that cp doesn't copy attributes when the size of file is zero. For example, launch StyledEdit and save document before typing anything, then, cp. cp doesn't copy BeIDE's settings file's attributes, too.

Tested on hrev26003.

comment:11 by emitrax, 16 years ago

Owner: changed from axeld to emitrax
Status: reopenednew

Yep. Easy to reproduce. I'll look into it tonight, if no one else beats me on time. Thanks.

comment:12 by anevilyak, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev26013.

comment:13 by shinta, 16 years ago

It works well. Thanks!

Note: See TracTickets for help on using tickets.