diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index e5ea71fae80..ced3c20f8e6 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -1502,16 +1502,20 @@ static BOOL append_entry( struct dir_data *data, const char *long_name, if (long_len == ARRAY_SIZE(long_nameW)) return TRUE; long_nameW[long_len] = 0; - if (short_name) - { - short_len = ntdll_umbstowcs( short_name, strlen(short_name), - short_nameW, ARRAY_SIZE( short_nameW ) - 1 ); - } - else /* generate a short name if necessary */ + short_len = 0; + + if (!disable_sfn) { - short_len = 0; - if (!is_legal_8dot3_name( long_nameW, long_len )) - short_len = hash_short_file_name( long_nameW, long_len, short_nameW ); + if (short_name) + { + short_len = ntdll_umbstowcs( short_name, strlen(short_name), + short_nameW, ARRAY_SIZE( short_nameW ) - 1 ); + } + else /* generate a short name if necessary */ + { + if (!is_legal_8dot3_name( long_nameW, long_len )) + short_len = hash_short_file_name( long_nameW, long_len, short_nameW ); + } } short_nameW[short_len] = 0; wcsupr( short_nameW ); diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 8e70e882191..ce5525c6ce6 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -2020,6 +2020,7 @@ static ULONG_PTR get_image_address(void) return 0; } +BOOL disable_sfn; BOOL ac_odyssey; BOOL fsync_simulate_sched_quantum; BOOL alert_simulate_sched_quantum; @@ -2041,6 +2042,12 @@ static void hacks_init(void) ERR( "HACK: ram_reporting_bias %lldMB.\n", ram_reporting_bias / (1024 * 1024) ); } + env_str = getenv("WINE_DISABLE_SFN"); + if (env_str) + disable_sfn = !!atoi(env_str); + else if (main_argc > 1 && (strstr(main_argv[1], "Yakuza5.exe") )) + disable_sfn = TRUE; + env_str = getenv("WINE_SIMULATE_ASYNC_READ"); if (env_str) ac_odyssey = !!atoi(env_str); diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 57bf0cdfd05..e5d0c794da9 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -181,6 +181,7 @@ extern SYSTEM_CPU_INFORMATION cpu_info; extern struct ldt_copy __wine_ldt_copy; #endif +extern BOOL disable_sfn; extern BOOL ac_odyssey; extern BOOL fsync_simulate_sched_quantum; extern BOOL alert_simulate_sched_quantum;