From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id B589B1F9FD for ; Tue, 16 Feb 2021 04:17:14 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id C2ED8120A77; Tue, 16 Feb 2021 13:16:19 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 69152120A71 for ; Tue, 16 Feb 2021 13:16:18 +0900 (JST) Received: by filterdrecv-p3las1-c477c4585-zn4vn with SMTP id filterdrecv-p3las1-c477c4585-zn4vn-19-602B4745-37 2021-02-16 04:17:09.923228269 +0000 UTC m=+538149.315804333 Received: from herokuapp.com (unknown) by geopod-ismtpd-3-2 (SG) with ESMTP id FuT9kaAjSZqR6ikQZvlcNQ for ; Tue, 16 Feb 2021 04:17:09.622 +0000 (UTC) Date: Tue, 16 Feb 2021 04:17:09 +0000 (UTC) From: naruse@airemix.jp Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Redmine-MailingListIntegration-Message-Ids: 78446 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17626 X-Redmine-Issue-Author: agate-pris X-Redmine-Sender: naruse X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?UqoG4vcRhHM9V1I4f4J7DhjzUfTg+8muXbMD6UD+LVQ2pJrw92M+a6L+l1c3VT?= =?us-ascii?Q?sX=2FbTytWXT7yjfgRTEBpxSbH4EjK9Lf2FTSJ6gN?= =?us-ascii?Q?ZPXawj=2FiPhlMwm+js2ZusOLcKAS=2FUW7tGIxVgHW?= =?us-ascii?Q?fNR6e0DYb0fS7w1foMF5OkH61doxI+zfknh7Fkb?= =?us-ascii?Q?0EeT2MRAp31F8TkVAJgq4MXki9Ysjag+kKgiVej?= =?us-ascii?Q?lnCN=2FAbTLAuunLtrA=3D?= To: ruby-dev@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-dev X-Mail-Count: 51024 Subject: [ruby-dev:51024] [Ruby master Bug#17626] FileUtils.cp may cause utime_failed X-BeenThere: ruby-dev@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: "Ruby developers \(Japanese\)" List-Id: "Ruby developers \(Japanese\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-dev-bounces@ruby-lang.org Sender: "ruby-dev" Issue #17626 has been updated by naruse (Yui NARUSE).=0D =0D Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED, 3.0: REQ= UIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONE=0D =0D ruby_3_0 551f1236a43ad014522d120dea1f136052879c0a merged revision(s) a681c4= 84a3c5b9235c84bc5c253b4406e498e8cf.=0D =0D ----------------------------------------=0D Bug #17626: FileUtils.cp may cause utime_failed=0D https://bugs.ruby-lang.org/issues/17626#change-90411=0D =0D * Author: agate-pris (agate pris)=0D * Status: Closed=0D * Priority: Normal=0D * ruby -v: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]=0D * Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONE=0D ----------------------------------------=0D FileUtils.cp will cause utime_failed if the file name contains Japanese cha= racters and preserve is true.=0D =0D This will probably only happen on Windows. It occures on Windows 10 version= 2004 build 21301.1010.=0D =0D ``` ruby=0D require 'fileutils'=0D =0D FileUtils.cp('foo', 'foo_copy', preserve: true)=0D FileUtils.cp('foo', 'foo=E3=82=B3=E3=83=94=E3=83=BC', preserve: true)=0D ```=0D =0D ``` sh=0D $ ruby test.rb=0D C:/tools/ruby30/lib/ruby/3.0.0/fileutils.rb:1424:in `utime': No such file o= r directory @ utime_failed - foo=E3=82=B3=E3=83=94=E3=83=BC (Errno::ENOENT)=0D from C:/tools/ruby30/lib/ruby/3.0.0/fileutils.rb:1424:in `copy_meta= data'=0D from C:/tools/ruby30/lib/ruby/3.0.0/fileutils.rb:515:in `copy_file'=0D from C:/tools/ruby30/lib/ruby/3.0.0/fileutils.rb:433:in `block in c= p'=0D from C:/tools/ruby30/lib/ruby/3.0.0/fileutils.rb:1597:in `block in = fu_each_src_dest'=0D from C:/tools/ruby30/lib/ruby/3.0.0/fileutils.rb:1613:in `fu_each_s= rc_dest0'=0D from C:/tools/ruby30/lib/ruby/3.0.0/fileutils.rb:1595:in `fu_each_s= rc_dest'=0D from C:/tools/ruby30/lib/ruby/3.0.0/fileutils.rb:432:in `cp'=0D from test.rb:4:in `
'=0D ```=0D =0D The expected result is copy to foo=E3=82=B3=E3=83=94=E3=83=BC is success sa= me like copy to foo_copy.=0D =0D =0D ---Files--------------------------------=0D ruby-w32_utimensat.patch (326 Bytes)=0D =0D =0D --=20=0D https://bugs.ruby-lang.org/=0D