When copying attributes only, it suffices to open the target read-only. Fixes

the image build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30677 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-05-09 12:39:33 +00:00
parent 04080048df
commit 6b5090f2f6
+1 -1
View File
@@ -1356,7 +1356,7 @@ command_cp(int argc, const char* const* argv)
// open the target node for attributes only mode
NodeDeleter targetDeleter;
if (options.attributesOnly) {
error = targetDomain->Open(target, FSSH_O_WRONLY, targetNode);
error = targetDomain->Open(target, FSSH_O_RDONLY, targetNode);
if (error != FSSH_B_OK) {
fprintf(stderr, "Error: Failed to open target `%s' for writing: "
"`%s'\n", target, fssh_strerror(error));