Changeset - r2560:f65eec50299d
[Not reviewed]
master
0 3 0
Darkvater - 18 years ago 2005-10-28 00:18:57
darkvater@openttd.org
(svn r3097) - Fix (regression): unix has a trailing slash after the paths, windows does not, no idea why os2 has. Way to go consistency :s. So anyways, just strip trailing slash
3 files changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
os2.c
Show inline comments
 
@@ -356,6 +356,8 @@ char *FiosBrowseTo(const FiosItem *item)
 

	
 
		case FIOS_TYPE_DIRECT:
 
			sprintf(path, "%s\\", item->name);
 
			s = strrchr(path, '\\');
 
			if (s[1] == '\0') s[0] = '\0'; // strip trailing slash
 
			break;
 

	
 
		case FIOS_TYPE_FILE:
unix.c
Show inline comments
 
@@ -312,7 +312,9 @@ char *FiosBrowseTo(const FiosItem *item)
 
			break;
 

	
 
		case FIOS_TYPE_DIRECT:
 
			sprintf(path, "%s\\", item->name);
 
			sprintf(path, "%s/", item->name);
 
			s = strrchr(path, '/');
 
			if (s[1] == '\0') s[0] = '\0'; // strip trailing slash
 
			break;
 

	
 
		case FIOS_TYPE_FILE:
win32.c
Show inline comments
 
@@ -919,6 +919,9 @@ char *FiosBrowseTo(const FiosItem *item)
 

	
 
		case FIOS_TYPE_DIRECT:
 
			sprintf(path, "%s\\", item->name);
 
			s = strrchr(path, '\\');
 
			if (s[1] == '\0') s[0] = '\0'; // strip trailing slash
 

	
 
			break;
 

	
 
		case FIOS_TYPE_FILE:
0 comments (0 inline, 0 general)