From: Pedro Nishiyama nishiyama.v3@gmail.com
--- dlls/ntdll/unix/file.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 98e50082904..30e8f554298 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -240,6 +240,8 @@ static unsigned int dir_data_cache_size; static BOOL show_dot_files; static mode_t start_umask;
+static BOOL disable_8dot3_filenames; + /* at some point we may want to allow Winelib apps to set this */ static const BOOL is_case_sensitive = FALSE;
@@ -1510,7 +1512,7 @@ static BOOL append_entry( struct dir_data *data, const char *long_name, else /* generate a short name if necessary */ { short_len = 0; - if (!is_legal_8dot3_name( long_nameW, long_len )) + if (!is_legal_8dot3_name( long_nameW, long_len ) && !disable_8dot3_filenames) short_len = hash_short_file_name( long_nameW, long_len, short_nameW ); } short_nameW[short_len] = 0; @@ -3013,6 +3015,7 @@ void init_files(void) if (!open_hkcu_key( "Software\Wine", &key )) { static WCHAR showdotfilesW[] = {'S','h','o','w','D','o','t','F','i','l','e','s',0}; + static WCHAR disable8dot3filenamesW[] = {'D','i','s','a','b','l','e','8','d','o','t','3','F','i','l','e','n','a','m','e','s',0}; char tmp[80]; DWORD dummy; UNICODE_STRING nameW; @@ -3023,6 +3026,14 @@ void init_files(void) WCHAR *str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)tmp)->Data; show_dot_files = IS_OPTION_TRUE( str[0] ); } + + init_unicode_string( &nameW, disable8dot3filenamesW ); + if (!NtQueryValueKey( key, &nameW, KeyValuePartialInformation, tmp, sizeof(tmp), &dummy )) + { + WCHAR *str = (WCHAR *)((KEY_VALUE_PARTIAL_INFORMATION *)tmp)->Data; + disable_8dot3_filenames = IS_OPTION_TRUE( str[0] ); + } + NtClose( key ); } }