Skip to content

Commit

Permalink
[Tag] add unix path separator
Browse files Browse the repository at this point in the history
  • Loading branch information
xan1242 committed Aug 22, 2022
1 parent 0b3c153 commit 4eb9b40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion XNFSMusicPlayer/XNFSMusicPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

// TODO - implement proper versioning
#define BUILD_VER_MAJOR 1
#define BUILD_VER_MINOR 11
#define BUILD_VER_MINOR 12

#define FILE_TYPE_TRACKER 1
#define FILE_TYPE_STREAM 2
Expand Down
6 changes: 6 additions & 0 deletions XNFSMusicPlayer/XNFSMusicPlayer_TagReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ void ReadFilenameAsTrackName(const char* FilePath, int TrackNumber, JukeboxTrack
memset(JukeStuff, 0, 255);

pch1 = strrchr(FilePath, '\\');
if (pch1 == NULL)
pch1 = strrchr(FilePath, '/');
pch2 = strrchr(FilePath, '.');

if (pch1 == NULL)
Expand All @@ -42,6 +44,8 @@ void ReadLastFolderAsAlbum(const char* FilePath, int TrackNumber, JukeboxTrack*
const char *pch3;

pch1 = strrchr(FilePath, '\\');
if (pch1 == NULL)
pch1 = strrchr(FilePath, '/');
pch2 = strrchr(FilePath, '.');

memset(JukeStuff, 0, 255);
Expand All @@ -53,6 +57,8 @@ void ReadLastFolderAsAlbum(const char* FilePath, int TrackNumber, JukeboxTrack*
memset(Buffer2, 0, 255);
strncpy(Buffer2, FilePath, pch1 - FilePath);
pch3 = strrchr(Buffer2, '\\');
if (pch3 == NULL)
pch3 = strrchr(Buffer2, '/');
if (pch3 == NULL)
{
strncpy(JukeStuff, FilePath, pch1 - FilePath);
Expand Down

0 comments on commit 4eb9b40

Please sign in to comment.