diff options
author | Björn Gustavsson <[email protected]> | 2013-02-12 14:30:13 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-02-12 14:30:13 +0100 |
commit | cd08400f92ec7672025bf39a458effcf33a423dc (patch) | |
tree | b874f8c3fe97558d72dcaedc31dd941060ccea75 /erts/emulator/sys/common | |
parent | bbf692965470a9e993e1afd6f1a9375cbe832fcb (diff) | |
parent | 08bc8a328275e751836fab0c562b50cf71000c2b (diff) | |
download | otp-cd08400f92ec7672025bf39a458effcf33a423dc.tar.gz otp-cd08400f92ec7672025bf39a458effcf33a423dc.tar.bz2 otp-cd08400f92ec7672025bf39a458effcf33a423dc.zip |
Merge branch 'pan/unicode_filename_warnings'
* pan/unicode_filename_warnings:
Add file:list_dir_all/1 and file:read_link_all/1
prim_file: Add list_dir_all() and read_link_all()
Teach prim_file:set_cwd() to avoid entering non-translatable directories
Make prim_file skip invalid filenames in unicode mode
prim_file: Refactor functions that return filenames
prim_file: Refactor handling of responses
prim_file: Always open non-file ports in binary mode
Test that list_dir("non-existing-dir") fails with the correct error
Diffstat (limited to 'erts/emulator/sys/common')
-rw-r--r-- | erts/emulator/sys/common/erl_sys_common_misc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/erts/emulator/sys/common/erl_sys_common_misc.c b/erts/emulator/sys/common/erl_sys_common_misc.c index 1bf5fa89f4..a0cd4cd10a 100644 --- a/erts/emulator/sys/common/erl_sys_common_misc.c +++ b/erts/emulator/sys/common/erl_sys_common_misc.c @@ -47,14 +47,16 @@ /* Written once and only once */ static int filename_encoding = ERL_FILENAME_UNKNOWN; +static int filename_warning = ERL_FILENAME_WARNING_WARNING; #if defined(__WIN32__) || defined(__DARWIN__) static int user_filename_encoding = ERL_FILENAME_UTF8; /* Default unicode on windows */ #else static int user_filename_encoding = ERL_FILENAME_LATIN1; #endif -void erts_set_user_requested_filename_encoding(int encoding) +void erts_set_user_requested_filename_encoding(int encoding, int warning) { user_filename_encoding = encoding; + filename_warning = warning; } int erts_get_user_requested_filename_encoding(void) @@ -62,6 +64,11 @@ int erts_get_user_requested_filename_encoding(void) return user_filename_encoding; } +int erts_get_filename_warning_type(void) +{ + return filename_warning; +} + void erts_init_sys_common_misc(void) { #if defined(__WIN32__) |