mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fixed codepage for utime [Bug #17626]
Should use the given codepage argument. Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
parent
416956afa6
commit
a681c484a3
2 changed files with 8 additions and 1 deletions
|
@ -679,6 +679,13 @@ class TestFileExhaustive < Test::Unit::TestCase
|
|||
File.utime(t + 1, t + 2, zerofile)
|
||||
assert_equal(t + 1, File.atime(zerofile))
|
||||
assert_equal(t + 2, File.mtime(zerofile))
|
||||
Dir.mktmpdir do |dir|
|
||||
Dir.chdir do
|
||||
path = "foo\u{30b3 30d4 30fc}"
|
||||
File.write(path, "") rescue next
|
||||
assert_equal(1, File.utime(nil, nil, path))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_utime_symlinkfile
|
||||
|
|
|
@ -7400,7 +7400,7 @@ wutimensat(int dirfd, const WCHAR *path, const struct timespec *times, int flags
|
|||
static int
|
||||
w32_utimensat(int dirfd, const char *path, const struct timespec *times, int flags, UINT cp)
|
||||
{
|
||||
WCHAR *wpath = mbstr_to_wstr(filecp(), path, -1, NULL);
|
||||
WCHAR *wpath = mbstr_to_wstr(cp, path, -1, NULL);
|
||||
int ret = -1;
|
||||
|
||||
if (wpath) {
|
||||
|
|
Loading…
Reference in a new issue