Fix for my previous commit (r1973): Print only the volume
name. Limit length to 8 because exceeding the requester border leeds to crashes. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1974 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
7e7c718d40
commit
469431446e
@ -815,7 +815,14 @@ void Button_Stats(void)
|
|||||||
if (mem_size != 0)
|
if (mem_size != 0)
|
||||||
{
|
{
|
||||||
#if defined(__AROS__)
|
#if defined(__AROS__)
|
||||||
sprintf(buffer,"Free space on %s",Main_current_directory);
|
char *colon = strchr(Main_current_directory, ':');
|
||||||
|
int len = strlen(Main_current_directory);
|
||||||
|
if (colon)
|
||||||
|
{
|
||||||
|
len = (long)colon - (long)Main_current_directory;
|
||||||
|
}
|
||||||
|
if (len > 8) len = 8;
|
||||||
|
sprintf(buffer,"Free space on %.*s:",len,Main_current_directory);
|
||||||
#else
|
#else
|
||||||
sprintf(buffer,"Free space on %c:",Main_current_directory[0]);
|
sprintf(buffer,"Free space on %c:",Main_current_directory[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user