From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 11:19:50 2016 Received: (at submit) by debbugs.gnu.org; 7 Feb 2016 16:19:50 +0000 Received: from localhost ([127.0.0.1]:37361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSS3y-0008UA-Bw for submit@debbugs.gnu.org; Sun, 07 Feb 2016 11:19:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60376) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSS3x-0008Tx-5Z for submit@debbugs.gnu.org; Sun, 07 Feb 2016 11:19:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSS3r-0006bj-CG for submit@debbugs.gnu.org; Sun, 07 Feb 2016 11:19:43 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSS3r-0006bf-8C for submit@debbugs.gnu.org; Sun, 07 Feb 2016 11:19:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSS3q-0004ip-HC for bug-coreutils@gnu.org; Sun, 07 Feb 2016 11:19:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSS3n-0006bR-CI for bug-coreutils@gnu.org; Sun, 07 Feb 2016 11:19:42 -0500 Received: from homie.mail.dreamhost.com ([208.97.132.208]:49874 helo=homiemail-a5.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSS3n-0006b9-6Z for bug-coreutils@gnu.org; Sun, 07 Feb 2016 11:19:39 -0500 Received: from homiemail-a5.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a5.g.dreamhost.com (Postfix) with ESMTP id EFF7170406A for ; Sun, 7 Feb 2016 08:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=LW+P1i/UV9fkyjmtkqnq4mqxebk=; b=Wq7LtAnhMMCT71up R+hBZFXjyFLqG1v9BbZ6D8hBqr7jjCwX9xE1lemD70Da2BYIW0xSFqhAZIB355Nc 1JvYy9rfXFhUJKf0PCHJvumzahvAVVPH3ntk9qZb8Ov6+gK0Er4181pNmO1kkZGD 6dPIN57nJQuIWbx394sqYT5id8s= Received: from jidanni.org (114-41-23-186.dynamic.hinet.net [114.41.23.186]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a5.g.dreamhost.com (Postfix) with ESMTPSA id BA77F704063 for ; Sun, 7 Feb 2016 08:19:35 -0800 (PST) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: bug-coreutils@gnu.org Subject: cp could be more precise than "Not a directory" Date: Mon, 08 Feb 2016 00:19:33 +0800 Message-ID: <87fux4jxwq.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) $ cp .profile /tmp/My_DocVments/ cp: cannot create regular file '/tmp/My_DocVments/': Not a directory Well can't it be more precise: No such directory nor file. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 16:53:05 2016 Received: (at 22584) by debbugs.gnu.org; 7 Feb 2016 21:53:05 +0000 Received: from localhost ([127.0.0.1]:37637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSXGS-0004MY-66 for submit@debbugs.gnu.org; Sun, 07 Feb 2016 16:53:05 -0500 Received: from nm13-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.79]:54331) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSXGQ-0004M4-3A for 22584@debbugs.gnu.org; Sun, 07 Feb 2016 16:53:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1454881976; bh=N9QTeb+1PNYGvzUjzplw8/Pv0E8dGP9zPAB6iA1Hwc8=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=SnznLNcquUikRVGRTcQW54zSphPpX5+oZR5j/462RvFZEvGYTjod5vvWC0h0+90fMtGhFyQOXTZQl6pe+szjjKbZn89kpMu8EOL8+oDw9lcr2+Zk4n8gAJA1IYjrOsLtp9bWkGrNI25+ddxcJQyV8emwpboWaTR3EuEgnKZIrcnlqEsF3shxUO9zPA+PvovK+Az3zaRbZ2auR5BQm5QjARRdikZgNADl4IJ/QHRuJ2HtjiYJRGt2ki/WtgRAs2ry8icbOM492X5sY85a/OghUhfbFyPUaY+Pam7mPDBuJhkr6Y3og9Xt4/wfUJtKsbuusW/OPdlZg9+FzBjWv82WFA== Received: from [98.139.170.181] by nm13.bullet.mail.bf1.yahoo.com with NNFMP; 07 Feb 2016 21:52:56 -0000 Received: from [98.139.212.229] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 07 Feb 2016 21:52:56 -0000 Received: from [127.0.0.1] by omp1038.mail.bf1.yahoo.com with NNFMP; 07 Feb 2016 21:52:56 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 780722.65610.bm@omp1038.mail.bf1.yahoo.com X-YMail-OSG: 6juza8sVM1mdcUZ.uqkCHgTrf6eoEBb3pHUYF62bh1EXgDvtJ0v5Nvwg7BMxiet 10MSLcUca_HphavNIWWTm4ZwVLX6TnzN_gyDNIY3MS8EqgR2NiG0ThzBLrf7pdul7VhWngohX_8E F0A7Rb9I625DvHt6MTdF_cCSG4.IiXLhc6p_nk2FBKXyh2sg_I4bZTJh7RinxUMxPmzD4IVZ8pfX kWhMgLOPZktFx0Vy9FfjapaX6cSB7eOGpNc6dCJFZ1hWL42PRALUoIIjeEqmUFL4Ymb0HWwt4j1U H34DmEob2kvkAXufLSj15Dft2jpuWL3pJv_uXHKigb88lyeAF3mqq4ioVCWy2NLfUtpHJNp11NiR HMRoroB0WrzKaLS4TJ1bdF14eYbkxpRus3fdFYPltzbbjU8ByDFhMwGgh3Bt_AnhR.LhdXberCSl TAhUpsUDpJDq7NfwZSUtizEGJxiKrMLNqLIA0BsPxRZkrqcdmx6CoE9WO4jPNkm1NyFj28ZZT_s8 31HjznZQzLlMaDzc- Received: by 76.13.26.107; Sun, 07 Feb 2016 21:52:56 +0000 Date: Sun, 7 Feb 2016 21:52:55 +0000 (UTC) From: Leslie S Satenstein To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC_Dan_Jacobson?= , "22584@debbugs.gnu.org" <22584@debbugs.gnu.org> Message-ID: <269915351.651462.1454881975747.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <87fux4jxwq.fsf@jidanni.org> References: <87fux4jxwq.fsf@jidanni.org> Subject: Re: bug#22584: cp could be more precise than "Not a directory" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_651461_2126044574.1454881975741" Content-Length: 4630 X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 22584 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Leslie S Satenstein Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) ------=_Part_651461_2126044574.1454881975741 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Should that be=C2=A0 cp .profile /tmp/My_DocVments =C2=A0 #no trailing slas= h=C2=A0Regards=20 =C2=A0Leslie Mr. Leslie Satenstein Montr=C3=A9al Qu=C3=A9bec, Canada =20 From: =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson To: 22584@debbugs.gnu.org=20 Sent: Sunday, February 7, 2016 11:19 AM Subject: bug#22584: cp could be more precise than "Not a directory" =20 $ cp .profile /tmp/My_DocVments/cp: cannot create regular file '/tmp/My_Doc= Vments/': Not a directory Well can't it be more precise: No such directory nor file. =20 ------=_Part_651461_2126044574.1454881975741 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Should that be  cp .profile /tmp/My_DocVments &nbs= p; #no trailing slash
 
<= div id=3D"yui_3_16_0_1_1454881668340_5648">
Regards

 Leslie
=
Mr. Leslie Satenstein=
Montr=C3=A9= al Qu=C3=A9bec, Canada



=
From: =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobs= on <jidanni@jidanni.org>
To= : 22584@debbugs.gnu.org
Sent: Sunday, February 7, 2016 11:19 AM
Subject: bug#22584: cp could be more pre= cise than "Not a directory"

$ cp .profile /tmp/My_DocVments/
cp: cannot= create regular file '/tmp/My_DocVments/': Not a directory

Well can'= t it be more precise:
No such directory nor file.




------=_Part_651461_2126044574.1454881975741-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 08 04:42:04 2016 Received: (at 22584) by debbugs.gnu.org; 8 Feb 2016 09:42:04 +0000 Received: from localhost ([127.0.0.1]:37968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSiKa-0002hK-0d for submit@debbugs.gnu.org; Mon, 08 Feb 2016 04:42:04 -0500 Received: from homie.mail.dreamhost.com ([208.97.132.208]:41283 helo=homiemail-a99.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSiKZ-0002hD-5q for 22584@debbugs.gnu.org; Mon, 08 Feb 2016 04:42:03 -0500 Received: from homiemail-a99.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a99.g.dreamhost.com (Postfix) with ESMTP id 06A4CFB0073; Mon, 8 Feb 2016 01:42:00 -0800 (PST) Received: from jidanni.org (111-246-85-22.dynamic.hinet.net [111.246.85.22]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a99.g.dreamhost.com (Postfix) with ESMTPSA id 9AF30FB0072; Mon, 8 Feb 2016 01:41:59 -0800 (PST) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: Leslie S Satenstein Subject: Re: bug#22584: cp could be more precise than "Not a directory" References: <87fux4jxwq.fsf@jidanni.org> Date: Mon, 08 Feb 2016 17:41:56 +0800 Message-ID: <87io1zr123.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22584 Cc: "22584@debbugs.gnu.org" <22584@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) No I am talking about when there is a slash, but no such file or directory. >>>>> "LSS" == Leslie S Satenstein writes: LSS> Should that be cp .profile /tmp/My_DocVments #no trailing slash From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 08 13:50:04 2016 Received: (at 22584) by debbugs.gnu.org; 8 Feb 2016 18:50:05 +0000 Received: from localhost ([127.0.0.1]:60467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSqsu-0003Ic-Nk for submit@debbugs.gnu.org; Mon, 08 Feb 2016 13:50:04 -0500 Received: from mail-qg0-f44.google.com ([209.85.192.44]:36240) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSqsq-0003Hl-Cd for 22584@debbugs.gnu.org; Mon, 08 Feb 2016 13:50:00 -0500 Received: by mail-qg0-f44.google.com with SMTP id y9so119868289qgd.3 for <22584@debbugs.gnu.org>; Mon, 08 Feb 2016 10:50:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=grxeHZsHGNkjtrEwA4QHSrqJowerYYZWdnZr0f6qaq4=; b=lu/DfIBQID7Vy5dziiLc8wPGgAI+Xr1+BKMsfvEaqUR4dGPSQwdFk0f3IrypUhyjI2 8yt7TxAjDDVR0GucLscn3/GcvWdZDcpp2ixehy280uJ2WwE8d6JRSYvgmH4jee8GQqhc 3PhO/2YhTdRodJjaO7SwC1e5F2wRKUS+NDrFpKWOr004VGaEMOLDRYklAgkYWrOJEXm5 sd+/t1a1NNXRzeQxQaBi0S/WM/7jhkyXDAEg84CO1Y39Aq0QpUhVe3c+MJNuIBD9q8NZ OZCMMDB4rwMfzeB59tCXpnERfYR8f9V0mghqJR2pUiacpAozXWn6XF3rTbzXZrWZVz6u R63Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=grxeHZsHGNkjtrEwA4QHSrqJowerYYZWdnZr0f6qaq4=; b=Uu4YpQWofOs/P4AHICGLmBFREyS6dp3b3X1VTxz2ofJ+Xjgfx0TUeVk7zTWU8MwO+L 2Nn5lMZGZOZrVGTVWekCMPN27LpJEKJo7fHsPbqJDmgaMEhkr4/5fud+km/BppbhHlDs eJ2tuG1w+03Jh5CQtKh5/eoiqoDlHFhIm0XpQOqRcZ6FN1h+Lu00DKt5Qx36UVuCmZVp Y6vIPR6fjfiehBslG/yNIB45XAhJAtJxJqs5q332GBqSde/G1yEDzxgkFRbBvAJhuXLs X9YyuY8QTD/SQ2uO7KtpxN7omx7H1i/t5yFXwmE8lr020TvlSTJJJa112764T9qEQyEb 7OnA== X-Gm-Message-State: AG10YORMOgd7vEaI2wo2twl8XMlnd7MCknjQxwgJX+R0YMZF4g3Hayd1DeFeDzhdPBGKOA== X-Received: by 10.140.93.247 with SMTP id d110mr34480684qge.28.1454942523119; Mon, 08 Feb 2016 06:42:03 -0800 (PST) Received: from disco.erlich.nygenome.org ([69.74.14.178]) by smtp.googlemail.com with ESMTPSA id s130sm13920764qhb.6.2016.02.08.06.42.01 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Feb 2016 06:42:02 -0800 (PST) Subject: Re: bug#22584: cp could be more precise than "Not a directory" To: =?UTF-8?B?56mN5Li55bC8IERhbiBKYWNvYnNvbg==?= , 22584@debbugs.gnu.org References: <87fux4jxwq.fsf@jidanni.org> From: Assaf Gordon Message-ID: <56B8A93E.2040204@gmail.com> Date: Mon, 8 Feb 2016 09:42:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <87fux4jxwq.fsf@jidanni.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22584 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hello Dan, A bit more technical information (though not a resolution): On 02/07/2016 11:19 AM, 積丹尼 Dan Jacobson wrote: > $ cp .profile /tmp/My_DocVments/ > cp: cannot create regular file '/tmp/My_DocVments/': Not a directory > > Well can't it be more precise: > No such directory nor file. This is in fact done on purpose, explicitly in the code. To illustrate: $ rm -rf /tmp/foobar $ strace -e stat cp .profile /tmp/foobar/ stat("/tmp/foobar/", 0x7ffe77e60ed0) = -1 ENOENT (No such file or directory) cp: cannot create regular file ‘/tmp/foobar/’: Not a directory Despite stat(2) return error of 'ENOENT', the code in src/copy.c:1150 sets the error code to ENOTDIR (The comment refers only to 'EISDIR', perhaps others can expand on why): /* Improve quality of diagnostic when a nonexistent dst_name ends in a slash and open fails with errno == EISDIR. */ if (dest_desc < 0 && dest_errno == EISDIR && *dst_name && dst_name[strlen (dst_name) - 1] == '/') dest_errno = ENOTDIR; Then at src/copy.c:1150, the error is reported: error (0, dest_errno, _("cannot create regular file %s"), quoteaf (dst_name)); === Perhaps this is done to simulate the real ENOTDIR which is returned if the file exist but is not a directory: $ rm -rf /tmp/foobar $ touch /tmp/foobar $ strace -e stat cp ~/.profile /tmp/foobar/ stat("/tmp/foobar/", 0x7ffd40edf6c0) = -1 ENOTDIR (Not a directory) cp: failed to access ‘/tmp/foobar/’: Not a directory === regards, - assaf From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 08 16:28:24 2016 Received: (at 22584) by debbugs.gnu.org; 8 Feb 2016 21:28:24 +0000 Received: from localhost ([127.0.0.1]:60574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aStM8-000757-D6 for submit@debbugs.gnu.org; Mon, 08 Feb 2016 16:28:24 -0500 Received: from homie.mail.dreamhost.com ([208.97.132.208]:60770 helo=homiemail-a38.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aStM6-00074y-9V for 22584@debbugs.gnu.org; Mon, 08 Feb 2016 16:28:22 -0500 Received: from homiemail-a38.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a38.g.dreamhost.com (Postfix) with ESMTP id 587F810AFC6; Mon, 8 Feb 2016 13:28:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=jidanni.org; bh=4oKdpvzx2nV+JidmzjwyXUO0fUE=; b=JJ9/bU0+KKpD4 AVhGb8clh9UjFQ4dUdeW/kuo37E65Lm6cpkkBo6rPGpfzIl+/oUAnWSyiRk5B8mG y6uOeP4yRBTqJNo1wWyUICLwCLWyPRscWtyMFFXxJhn8M2hAuSVGSVhYhYXptlHm QR+ez5GfaYYIcW/kjTRhecccW+DZaE= Received: from jidanni.org (114-26-40-102.dynamic.hinet.net [114.26.40.102]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a38.g.dreamhost.com (Postfix) with ESMTPSA id 067B810AFC4; Mon, 8 Feb 2016 13:28:21 -0800 (PST) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: Assaf Gordon Subject: Re: bug#22584: cp could be more precise than "Not a directory" References: <87fux4jxwq.fsf@jidanni.org> Date: Tue, 09 Feb 2016 05:28:17 +0800 Message-ID: <87vb5yopse.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22584 Cc: 22584@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Ah ha, they just should have returned what the system calls said in the first place, and not tinker with the output! Them tinkering with the output only makes things worse. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 09 02:29:23 2016 Received: (at 22584) by debbugs.gnu.org; 9 Feb 2016 07:29:23 +0000 Received: from localhost ([127.0.0.1]:60901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aT2jj-00024r-Kf for submit@debbugs.gnu.org; Tue, 09 Feb 2016 02:29:23 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:64130) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aT2ji-00024b-Dp for 22584@debbugs.gnu.org; Tue, 09 Feb 2016 02:29:22 -0500 Received: from [192.168.101.10] ([217.86.69.36]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0Lpijq-1ZqwIh1U0c-00fPZh; Tue, 09 Feb 2016 08:29:13 +0100 Subject: Re: bug#22584: cp could be more precise than "Not a directory" To: =?UTF-8?B?56mN5Li55bC8IERhbiBKYWNvYnNvbg==?= , Assaf Gordon References: <87fux4jxwq.fsf@jidanni.org> <87vb5yopse.fsf@jidanni.org> From: Bernhard Voelker Message-ID: <56B99548.4050105@bernhard-voelker.de> Date: Tue, 9 Feb 2016 08:29:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <87vb5yopse.fsf@jidanni.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:XTXIchwmUuYsgcSw5DADuHTDvrC1k1g0xMZfK1Y6TC6ranlIDa1 apMgMO66ASBj+uHg7CPOja2BZHuAtEpk+lgrdeUAj1oUdlANOpf5LUSCaLCZbbc4hNLZEtS c+XewP3YlD3Us8MAAdOUz5Zf69Il/Jj30gCs1XhwKutdNm0unNJJEOTWk0xk9HFkkKX/ubO qv1PjC4qG6VOpl2kjH2gw== X-UI-Out-Filterresults: notjunk:1;V01:K0:JN+GyrkWxPE=:XCfjQDp4IZ6ShnPXT7w/yn p//iptt2DID9U6R3JsmV9jtchwhc5nhpwR4Io2HYrZz9u+RWQWdkMYml0c1WPP8uOk/UuCdGe K/J+sJuiDOj2oRtKIoCQvUNDWJYTRr7m/4GNNgZibLVYkAicK068RkIUK0yS8hYVyC8uh5zky mQ+YovlbjgMr5sJDZHUVOn6f6BOCkjxpoBX10koABYEGF1SjTQMvg+SYgeuqlcIWY9yH9Bfem s5mZUMlRDInQ8BRQQm8R43SfzX5h0oU35eNwsQGIbhc9BHrUUdyA/ig7qn98bq/tVUFVQoCLN cgaEQnOqrJIeoK2LOd8ZkKE4H/qMZ6FELNMdcd78z1fmyrRTPknnrPDeLK6wzsaAtXYziFxD8 crNNDWlo2XIyd+fHoAvlGkdc2VKmhvyxwMTLOdnAb3R/D43g3wkWGGrP5IfBjmQNfyuF7E1z+ EtdwEyzInU/xi3KJc0JrFYG85y9Hl6kL+yJe8jrHtOnhkjd87vjeMh8AO35473kPmZTeJLzdg yHEfGPBk5ND8q6hGcVCEDyFR4wdEiqHvxvBCyJoZj4dWksQ4Vw/ajiHc8/rQqK1eRcQcW+ecO PUcD3yFtTLernYpFSbID92VexoO4+8e/NQxahgA7yJRC5JHusv57ky6/+DSnbfvgN24yzYJ9t oCqeKn2YdeMozXfHbtrcY7aZwEc4pT+zMvv7PhwYbgyRf6Ndoukl/1Zmrufi/cLPi3cPe6nzN UQmc4hbTRAUqvj92 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 22584 Cc: 22584@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 02/08/2016 10:28 PM, 積丹尼 Dan Jacobson wrote: > Ah ha, they just should have returned what the system calls said in the > first place, and not tinker with the output! > > Them tinkering with the output only makes things worse. Actually this _is_ an improvement: After stat() has detected that the target does not exist, cp simply tries to open() it - and while it has a trailing slash, the kernel returns EISDIR: stat("/tmp/My_DocVments/", 0x7ffdd335eee0) = -1 ENOENT (No such file or directory) ... open("/tmp/My_DocVments/", O_WRONLY|O_CREAT|O_EXCL, 0644) = -1 EISDIR (Is a directory) Taking this over as-is, the error diagnostic would be quite confusing and plain wrong: cp: cannot create regular file ‘/tmp/My_DocVments/’: Is a directory Therefore, the current mapping to ENOTDIR - introduced in coreutils-v8.8 - is the best we can do: $ cp .profile /tmp/My_DocVments/ cp: cannot create regular file ‘/tmp/My_DocVments/’: Not a directory Your suggestion to say "no such file or directory" (ENOENT) would be misleading, because the target is treated by the system as a directory due to the trailing slash. Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 09 13:18:47 2016 Received: (at 22584) by debbugs.gnu.org; 9 Feb 2016 18:18:48 +0000 Received: from localhost ([127.0.0.1]:33833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTCsB-00024x-O0 for submit@debbugs.gnu.org; Tue, 09 Feb 2016 13:18:47 -0500 Received: from homie.mail.dreamhost.com ([208.97.132.208]:54101 helo=homiemail-a60.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTCsA-00024o-1k for 22584@debbugs.gnu.org; Tue, 09 Feb 2016 13:18:46 -0500 Received: from homiemail-a60.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a60.g.dreamhost.com (Postfix) with ESMTP id 320C83BC06B; Tue, 9 Feb 2016 10:18:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=jidanni.org; bh=pIJsiliYdSL8xwr0uhojuq6Gwko=; b=bnFDM1PZiQPz6 M7OcO+z56P+F4NoE5ojaqvLa9ibq9VO0JW8D4327pisdkD0AOuNSeRx5ugrMG2Qb PIlH/7gjhY3thUqUMuFkX09ZesdfUUyx6dkqOuuJ1m1cuHvNl8LfJ5SRQL0Z5zSk Vciq/C38JXQmKaNCO8WdfGYntYJb6A= Received: from jidanni.org (114-26-42-55.dynamic.hinet.net [114.26.42.55]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a60.g.dreamhost.com (Postfix) with ESMTPSA id E63163BC063; Tue, 9 Feb 2016 10:18:44 -0800 (PST) From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: Bernhard Voelker Subject: Re: bug#22584: cp could be more precise than "Not a directory" References: <87fux4jxwq.fsf@jidanni.org> Date: Wed, 10 Feb 2016 02:18:41 +0800 Message-ID: <87fux1eohq.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22584 Cc: 22584@debbugs.gnu.org, Assaf Gordon X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Actually then just returning both "bla/": No such file or directory "bla/": Is a directory would be better. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 09 20:15:45 2016 Received: (at 22584) by debbugs.gnu.org; 10 Feb 2016 01:15:45 +0000 Received: from localhost ([127.0.0.1]:34059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTJNg-0006Dz-Vd for submit@debbugs.gnu.org; Tue, 09 Feb 2016 20:15:45 -0500 Received: from mail-qk0-f176.google.com ([209.85.220.176]:33717) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTJNf-0006Dk-3d for 22584@debbugs.gnu.org; Tue, 09 Feb 2016 20:15:43 -0500 Received: by mail-qk0-f176.google.com with SMTP id s5so1934697qkd.0 for <22584@debbugs.gnu.org>; Tue, 09 Feb 2016 17:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=64Wm5bAm4nW+sCekJP1YXGTVa3WQwPkj//Ne7i0ABGk=; b=LVW+TTNi6SyXLLqvB1hpDwobb7h3xbZqgBFuxgdxE2gVRF0IIVxZqIXOZ9tJpdjV+6 G/tC3K11tjyQdL7aAdVIEUGByuFBZnmrCchgq4FUWM4xOFF3Q7z7is4/kJr7XPyBE1Jd /QNeoD5PYFDo6LA3anK319hcGkTt782LCnpcKeU8DHfUvrDvI11U/l/dDC4IjxcUTX+X lkNoayxZ2VlqMzgPldEyOfhHav1yvmiqWJmC58dTCrNb2hpmDTXuEgjN7r3td6DOdwyu ZPB17Yq1YdPueg7sCCdzx43bqMDHnaGgatbH+HyIOrYroe2AOWVKiETYV9t2UZ0xY5M5 X/1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=64Wm5bAm4nW+sCekJP1YXGTVa3WQwPkj//Ne7i0ABGk=; b=Fou6eYHOJpC9s5Z84KyHTmNeasbC7CBdUad1oGooGuyOcUBaajqcU0Vt+TgS5jXOmb w+wG4CcGpWtB4Bvk0e3wDA2181sdOS53shwIjhD7VwaPZIxwz4XNQCGQyL5Mox3BMr90 Ea2w/aKcC1coGRpC80aVztBB9H5EqY08y8f1bSUtwJvU3Y04r1fqkzzV5dyQzqPzBOuI DYAndgjb0tZ6smawpXNxqO93lwyuuTA2VjWW84W4uYsFbiKLEkXRFeqkhZoFqsIVsJJZ dPpiLQWqFudJnuPW5/zp/QmEWKf3/Oc3uas3oAPcBgEf8ftQcuhSMbd8j9/LnHeTcq6C i92w== X-Gm-Message-State: AG10YOQZhuMMOOg0kR/3ScN9lCQWV5g+Yi4efC7EWAMiBgO9ap4r2rYjgJZWb0JViqhg2w== X-Received: by 10.55.78.75 with SMTP id c72mr44822738qkb.97.1455066937734; Tue, 09 Feb 2016 17:15:37 -0800 (PST) Received: from ix.home (pool-71-190-191-24.nycmny.fios.verizon.net. [71.190.191.24]) by smtp.gmail.com with ESMTPSA id f34sm304265qgf.42.2016.02.09.17.15.36 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Feb 2016 17:15:37 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: bug#22584: cp could be more precise than "Not a directory" From: Assaf Gordon In-Reply-To: <56B99548.4050105@bernhard-voelker.de> Date: Tue, 9 Feb 2016 20:15:35 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <5DB75451-BC67-45C4-9BFC-98996683428A@gmail.com> References: <87fux4jxwq.fsf@jidanni.org> <87vb5yopse.fsf@jidanni.org> <56B99548.4050105@bernhard-voelker.de> To: Bernhard Voelker X-Mailer: Apple Mail (2.2102) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22584 Cc: 22584@debbugs.gnu.org, =?utf-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC_Dan_Jacobson?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > On Feb 9, 2016, at 02:29, Bernhard Voelker = wrote: [...] >=20 > After stat() has detected that the target does not exist, cp simply > tries to open() it - and while it has a trailing slash, the kernel > returns EISDIR: Thank you, Bernhard, for pointing the additional open/EISDIR - I missed = that part. That better explains the code in src/copy.c:1150 .=20 -assaf From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 25 11:45:25 2018 Received: (at 22584) by debbugs.gnu.org; 25 Oct 2018 15:45:25 +0000 Received: from localhost ([127.0.0.1]:42644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFhp6-0002Ku-NP for submit@debbugs.gnu.org; Thu, 25 Oct 2018 11:45:25 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:52879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFhp4-0002E3-AU; Thu, 25 Oct 2018 11:45:22 -0400 Received: by mail-it1-f193.google.com with SMTP id 134-v6so2190617itz.2; Thu, 25 Oct 2018 08:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Mt5WDkozqktE8EqjKCYTm7av1vjQHwfibdw5bPgD7uo=; b=Ysy7WO6zNeDU58Hdr7ZjQvrctcCnZ4VifHTZWu1B7j+lP6Fz1c8TwqWl6YAR/XJSzZ OwQ9XVwt65ysyHUhh01UuL43fcxBuGXy04WwGYdLl1CYmrEqmKEXI7A2cGmp5mAExbPI 04VMVKxw92P2VMou/tnandUvfp4mbBT92DPHOASOo+KL6gt9TyPLvMlVPeosqhWn0vRl Lp4QAe9D6DDvy3S52yr65aDQTaOn0Niidk2pPw6h98jJx1ut4dqq/GiZRC3vvGazmYzl DG/RfRjoVJLVjsjrt/SlQVgHt6DnV0lz07+/IvvBcH/P3bpsGAhYk00ByL/N2TkMUfLc Uh0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Mt5WDkozqktE8EqjKCYTm7av1vjQHwfibdw5bPgD7uo=; b=qFzqN8MMHKGkZanYJ2k/jLsXn3XudCoZLuJ5kI2nzfZMPSwQhlevBzA7RJpbDk0Txa 1mztWzt9Fd4Qls6LoAFxVMk2Psj+fEMehI5OrsrCtAqFhqtSGpS57o3IZ1SwgsSfAe/o GG+BlAik2OqcuUftiQJw25RutB45DDq/Q7jtfVlYj/wo2tlHZeowiFrShp3Bs3svVWgy tTDfXzQWoC7ztZS6CucTp3DpMQNo+XtcqNvMo+Z9yEbHhGLNIxJ8SR0dWYoD34sz6cDc z8VbZDx9aprbF9y8CdGQPFZBhCqaNgtkU8e4wzehR7bItnvrD2CNJQ68QVTPRwS+4nSJ waFw== X-Gm-Message-State: AGRZ1gKRMWykknGAUb5828HXHMlzFDWleM33gPP2KXMiXRNW91l0zceo cBs5gi8bEDDARYeLeZOGTaVDcSVm X-Google-Smtp-Source: AJdET5ckbuJC2TP4lbPh8vwuePnIrXEjWxAU+7/MmQLcRzmORq5VzjaGT3tMhH2Q/V5x3MQOhoWYbA== X-Received: by 2002:a05:660c:a06:: with SMTP id e6mr40171itk.62.1540482315893; Thu, 25 Oct 2018 08:45:15 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.gmail.com with ESMTPSA id d75-v6sm967731itc.41.2018.10.25.08.45.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Oct 2018 08:45:14 -0700 (PDT) Date: Thu, 25 Oct 2018 09:45:11 -0600 From: Assaf Gordon To: 22584@debbugs.gnu.org Subject: Re: bug#22584: cp could be more precise than "Not a directory" Message-ID: <20181025154510.wnwjkfyzzazkm3ft@tomato.housegordon.com> References: <87fux4jxwq.fsf@jidanni.org> <87vb5yopse.fsf@jidanni.org> <56B99548.4050105@bernhard-voelker.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <56B99548.4050105@bernhard-voelker.de> User-Agent: NeoMutt/20170113 (1.7.2) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 22584 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 22584 wishlist tags 22584 wontfix close 22584 stop (triaging old bugs) On Tue, Feb 09, 2016 at 08:29:12AM +0100, Bernhard Voelker wrote: > On 02/08/2016 10:28 PM, 積丹尼 Dan Jacobson wrote: > > Ah ha, they just should have returned what the system calls said in the > > first place, and not tinker with the output! > > > > Them tinkering with the output only makes things worse. > > Actually this _is_ an improvement: > > After stat() has detected that the target does not exist, cp simply > tries to open() it - and while it has a trailing slash, the kernel > returns EISDIR: > > stat("/tmp/My_DocVments/", 0x7ffdd335eee0) = -1 ENOENT (No such file or directory) > ... > open("/tmp/My_DocVments/", O_WRONLY|O_CREAT|O_EXCL, 0644) = -1 EISDIR (Is a directory) > > Taking this over as-is, the error diagnostic would be quite confusing and > plain wrong: > > cp: cannot create regular file ‘/tmp/My_DocVments/’: Is a directory > > Therefore, the current mapping to ENOTDIR - introduced in coreutils-v8.8 - > is the best we can do: > > $ cp .profile /tmp/My_DocVments/ > cp: cannot create regular file ‘/tmp/My_DocVments/’: Not a directory > > Your suggestion to say "no such file or directory" (ENOENT) would be misleading, > because the target is treated by the system as a directory due to the trailing > slash. > With no further follow-ups to this thread, I'm closing this bug. -assaf From unknown Tue Jun 24 05:14:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 23 Nov 2018 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator