From a92d9807237a024106b67f045822679f7ee4df54 Mon Sep 17 00:00:00 2001 From: tobigun Date: Sat, 14 Mar 2009 21:18:50 +0000 Subject: merge with current trunk (just update) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1634 b956fd51-792f-4845-bead-9b4dfca2ff2c --- unicode/src/base/USongs.pas | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'unicode/src/base/USongs.pas') diff --git a/unicode/src/base/USongs.pas b/unicode/src/base/USongs.pas index ac67eed0..852ccfc4 100644 --- a/unicode/src/base/USongs.pas +++ b/unicode/src/base/USongs.pas @@ -158,11 +158,13 @@ implementation uses StrUtils, - UGraphic, UCovers, UFiles, + UGraphic, UMain, UIni, + UPath, + UNote, UUnicodeUtils; constructor TSongs.Create(); @@ -282,7 +284,11 @@ var lSong : TSong; begin - Files := Platform.DirectoryFindFiles( Dir, '.txt', true); + try + Files := Platform.DirectoryFindFiles( Dir, '.txt', true) + except + Log.LogError('Couldn''t deal with directory/file: ' + Dir + ' in TSongs.BrowseTXTFiles') + end; for i := 0 to Length(Files)-1 do begin @@ -315,7 +321,11 @@ var lSong : TSong; begin - Files := Platform.DirectoryFindFiles( Dir, '.xml', true); + try + Files := Platform.DirectoryFindFiles( Dir, '.xml', true) + except + Log.LogError('Couldn''t deal with directory/file: ' + Dir + ' in TSongs.BrowseXMLFiles') + end; for i := 0 to Length(Files)-1 do begin @@ -670,7 +680,7 @@ begin end; // set CatNumber of last category - if (Ini.Tabs_at_startup = 1) and (High(Song) >= 1) then + if (Ini.TabsAtStartup = 1) and (High(Song) >= 1) then begin // set number of songs in previous category SongIndex := CatIndex - CatNumber; -- cgit v1.2.3