set_basename - move comments inside ifdef

This commit is contained in:
twinaphex 2014-12-15 17:21:25 +01:00
parent e98749e2a0
commit c30ddccd3e
1 changed files with 6 additions and 5 deletions

View File

@ -531,6 +531,8 @@ static void set_basename(const char *path)
strlcpy(g_extern.fullpath, path, sizeof(g_extern.fullpath)); strlcpy(g_extern.fullpath, path, sizeof(g_extern.fullpath));
strlcpy(g_extern.basename, path, sizeof(g_extern.basename)); strlcpy(g_extern.basename, path, sizeof(g_extern.basename));
#ifdef HAVE_COMPRESSION
/* Removing extension is a bit tricky for compressed files. /* Removing extension is a bit tricky for compressed files.
* Basename means: * Basename means:
* /file/to/path/game.extension should be: * /file/to/path/game.extension should be:
@ -538,7 +540,7 @@ static void set_basename(const char *path)
* *
* Two things to consider here are: /file/to/path/ is expected * Two things to consider here are: /file/to/path/ is expected
* to be a directory and "game" is a single file. This is used for * to be a directory and "game" is a single file. This is used for
* states and srm default paths * states and srm default paths.
* *
* For compressed files we have: * For compressed files we have:
* *
@ -546,13 +548,12 @@ static void set_basename(const char *path)
* /file/to/path/comp.7z#folder/game.extension * /file/to/path/comp.7z#folder/game.extension
* *
* The choice I take here is: * The choice I take here is:
* /file/to/path/game as basename. We might end up in a writable dir then * /file/to/path/game as basename. We might end up in a writable
* and the name of srm and states are meaningful. * directory then and the name of srm and states are meaningful.
* *
*/ */
#ifdef HAVE_COMPRESSION
path_basedir(g_extern.basename); path_basedir(g_extern.basename);
fill_pathname_dir(g_extern.basename,path,"",sizeof(g_extern.basename)); fill_pathname_dir(g_extern.basename, path, "", sizeof(g_extern.basename));
#endif #endif
if ((dst = strrchr(g_extern.basename, '.'))) if ((dst = strrchr(g_extern.basename, '.')))