From f28539265d753bbaa473cb488e951bfe47304a01 Mon Sep 17 00:00:00 2001
From: Rickard Green
Date: Thu, 12 Oct 2017 16:28:31 +0200
Subject: Revert "Merge branch 'rickard/null-char-filenames/ERL-370/OTP-14543'
into maint"
This reverts commit 0717a2194e863f3a78595184ccc5637697f03353, reversing
changes made to 71a40658a0cef8b3e25df3a8e48a72d0563a89bf.
---
lib/kernel/doc/src/file.xml | 38 ++++---------------------------------
lib/kernel/src/kernel.app.src | 2 +-
lib/kernel/test/file_name_SUITE.erl | 2 --
3 files changed, 5 insertions(+), 37 deletions(-)
(limited to 'lib/kernel')
diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml
index 593bee74fe..b674b3ca93 100644
--- a/lib/kernel/doc/src/file.xml
+++ b/lib/kernel/doc/src/file.xml
@@ -59,7 +59,7 @@
terminal supports UTF-8, otherwise latin1. The default can
be overridden using +fnl (to force latin1 mode)
or +fnu (to force utf8 mode) when starting
- erl.
+ erts:erl.
On operating systems with transparent naming, files can be
inconsistently named, for example, some files are encoded in UTF-8 while
@@ -81,22 +81,6 @@
See also section Notes About Raw Filenames in the STDLIB User's Guide.
-
- File operations used to accept filenames containing
- null characters (integer value zero). This caused
- the name to be truncated at the first null character.
- Filenames containing null characters inside the filename
- are now rejected and will cause primitive
- file operations fail.
-
-
- Currently null characters at the end of the filename
- will be accepted by primitive file operations. Such
- filenames are however still documented as invalid. The
- implementation will also change in the future and
- reject such filenames.
-
-
@@ -112,21 +96,9 @@
-
-
- See also the documentation of the
- name_all() type.
-
-
-
-
- See also the documentation of the
- name_all() type.
-
-
@@ -140,23 +112,21 @@
If VM is in Unicode filename mode, string() and char()
- are allowed to be > 255. See also the documentation of the
- name_all() type.
+ are allowed to be > 255.
- If VM is in Unicode filename mode, characters
+
If VM is in Unicode filename mode, string() and char()
are allowed to be > 255.
RawFilename is a filename not subject to
Unicode translation,
meaning that it can contain characters not conforming to
the Unicode encoding expected from the file system
(that is, non-UTF-8 characters although the VM is started
- in Unicode filename mode). Null characters (integer value zero)
- are not allowed in filenames (not even at the end).
+ in Unicode filename mode).
diff --git a/lib/kernel/src/kernel.app.src b/lib/kernel/src/kernel.app.src
index b5e5f8eb73..2a88cc7e26 100644
--- a/lib/kernel/src/kernel.app.src
+++ b/lib/kernel/src/kernel.app.src
@@ -120,6 +120,6 @@
{applications, []},
{env, [{error_logger, tty}]},
{mod, {kernel, []}},
- {runtime_dependencies, ["erts-9.1.1", "stdlib-3.4.3", "sasl-3.0"]}
+ {runtime_dependencies, ["erts-9.1", "stdlib-3.4", "sasl-3.0"]}
]
}.
diff --git a/lib/kernel/test/file_name_SUITE.erl b/lib/kernel/test/file_name_SUITE.erl
index f23529fec9..899102c908 100644
--- a/lib/kernel/test/file_name_SUITE.erl
+++ b/lib/kernel/test/file_name_SUITE.erl
@@ -302,9 +302,7 @@ check_normal(Mod) ->
{ok, BC} = Mod:read(FD,1024),
ok = file:close(FD)
end || {regular,Name,Content} <- NormalDir ],
- {error, badarg} = Mod:rename("fil1\0tmp_fil2","tmp_fil1"),
Mod:rename("fil1","tmp_fil1"),
- {error, badarg} = Mod:read_file("tmp_fil1\0.txt"),
{ok, <<"fil1">>} = Mod:read_file("tmp_fil1"),
{error,enoent} = Mod:read_file("fil1"),
Mod:rename("tmp_fil1","fil1"),
--
cgit v1.2.3