aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-01-02 23:16:37 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-01-02 23:16:37 +0000
commit6d9dc62a08dd1ee9efa9309eea71dba8f7a94b0c (patch)
treebce5468d51b41289b6e53a5d04436e529b6ef769 /src
parent27139592327b1ed0cd102ddd6b394a27d6931d44 (diff)
downloadusdx-6d9dc62a08dd1ee9efa9309eea71dba8f7a94b0c.tar.gz
usdx-6d9dc62a08dd1ee9efa9309eea71dba8f7a94b0c.tar.xz
usdx-6d9dc62a08dd1ee9efa9309eea71dba8f7a94b0c.zip
capture failure of file/dir access. Courtesy to Filipe Cabecinhas.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1545 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/base/USongs.pas12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/base/USongs.pas b/src/base/USongs.pas
index 6f66bf3f..7f5125a9 100644
--- a/src/base/USongs.pas
+++ b/src/base/USongs.pas
@@ -275,7 +275,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
@@ -308,7 +312,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