+
+ /* found home dir candidate */
+ if ( *path == '~' ) {
+ Q_strncpyz( temp, home, sizeof( temp ) );
+ path++;
+ }
+
+ /* concatenate */
+ if ( last > ( path + 1 ) ) {
+ Q_strncat( temp, sizeof( temp ), path, ( last - path ) );
+ Q_strcat( temp, sizeof( temp ), "/" );
+ }
+ Q_strcat( temp, sizeof( temp ), "./" );
+ Q_strcat( temp, sizeof( temp ), argv0 );
+
+ /* verify the path */
+ if ( access( temp, X_OK ) == 0 ) {
+ found++;
+ }
+ path = last + 1;