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=-2.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no 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 D78641F8C2 for ; Sat, 13 Feb 2021 11:48:20 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 134A7120A4F; Sat, 13 Feb 2021 20:47:24 +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 AF0B712093B for ; Sat, 13 Feb 2021 20:47:20 +0900 (JST) Received: by filterdrecv-p3mdw1-7c96677bb8-tv77d with SMTP id filterdrecv-p3mdw1-7c96677bb8-tv77d-20-6027BC77-4 2021-02-13 11:48:07.126542103 +0000 UTC m=+305979.850976785 Received: from herokuapp.com (unknown) by geopod-ismtpd-4-0 (SG) with ESMTP id dsb75GFHTNmGIvH9bZIJww for ; Sat, 13 Feb 2021 11:48:07.039 +0000 (UTC) Date: Sat, 13 Feb 2021 11:48:07 +0000 (UTC) From: agate.pris@gmail.com Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Redmine-MailingListIntegration-Message-Ids: 78402 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17626 X-Redmine-Issue-Author: agate-pris X-Redmine-Sender: agate-pris 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?+bagC4kj3qFBW8esTbxcncqOHt2ZNpcVkpbxDMSv0V5LQOxKE48nsj5A+KOinN?= =?us-ascii?Q?NrdAVlYZ2BsrnEmR3MbjilNvQIyJys3C37T+83r?= =?us-ascii?Q?pi4PF5oAyEffsWirGyV9LPvVhr=2FXr8HnoLkPHWN?= =?us-ascii?Q?kUa1om5J3ZdAlBhzjsVYjK0wP7q7aKHQVBUgBFH?= =?us-ascii?Q?gD5j=2FLzEN4oHNDUM=2FyPoPphUyhkcAGRv2vygmPA?= =?us-ascii?Q?UIuqPZGS23QaLnhl4=3D?= To: ruby-dev@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-dev X-Mail-Count: 51020 Subject: [ruby-dev:51020] [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 reported by agate-pris (agate pris).=0D =0D ----------------------------------------=0D Bug #17626: FileUtils.cp may cause utime_failed=0D https://bugs.ruby-lang.org/issues/17626=0D =0D * Author: agate-pris (agate pris)=0D * Status: Open=0D * Priority: Normal=0D * ruby -v: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]=0D * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN=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 =0D =0D --=20=0D https://bugs.ruby-lang.org/=0D