mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-26 08:57:55 +03:00
The system.ExistsFile() system call returns 1 if a file or directory exists, but returns 0 when the provided path ends with a directory separator, regardless of whether a directory exists at that location. This subtle difference in behavior caused problems in Pastel Chime 3.
9 lines
287 B
C
9 lines
287 B
C
// -*-mode: C; coding: sjis; -*-
|
|
|
|
void test_system(void)
|
|
{
|
|
string savedir = system.GetSaveFolderName();
|
|
test_equal("system.ExistFile(savedir) == 1", system.ExistFile(savedir), 1);
|
|
test_equal("system.ExistFile(savedir + \"\\\\\") == 1", system.ExistFile(savedir + "\\"), 0);
|
|
}
|