aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbasisbit <basisbit@b956fd51-792f-4845-bead-9b4dfca2ff2c>2015-09-12 00:48:54 +0000
committerbasisbit <basisbit@b956fd51-792f-4845-bead-9b4dfca2ff2c>2015-09-12 00:48:54 +0000
commit58df1656afc2ca59a81d848a7bec845ce7b674a0 (patch)
tree0d681989868e773766670e222795f60f2996d0f0 /src
parent677b57732337e906492afc11ba3e5a23b84eef85 (diff)
downloadusdx-58df1656afc2ca59a81d848a7bec845ce7b674a0.tar.gz
usdx-58df1656afc2ca59a81d848a7bec845ce7b674a0.tar.xz
usdx-58df1656afc2ca59a81d848a7bec845ce7b674a0.zip
* log if the audio file which is specified in the song .txt does not exist or is not accessible
* more aggressively try to write changes to text files on windows (also write if file is already opened somewhere). This allows modifying song .txt files on windows 7/8/10 even when VirtualStore is active for the user. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3135 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src')
-rw-r--r--src/base/UPath.pas4
-rw-r--r--src/base/USong.pas4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/base/UPath.pas b/src/base/UPath.pas
index ba5daf59..77ccd65d 100644
--- a/src/base/UPath.pas
+++ b/src/base/UPath.pas
@@ -1028,7 +1028,7 @@ function TPathImpl.IsFile(): boolean;
begin
// note the different specifications of FileExists() on Win32 <> Unix
{$IFDEF MSWINDOWS}
- Result := FileSystem.FileExists(Self);
+ Result:= FileSystem.FileExists(Self);
{$ELSE}
Result := Exists() and not IsDirectory();
{$ENDIF}
@@ -1183,7 +1183,7 @@ var
SaveMode: word;
begin
// save changes in write mode (= not read-only mode)
- if ((fMode and 3) <> fmOpenRead) then
+ if ((fMode) <> fmOpenRead) then
begin
if (fMode = fmCreate) then
SaveMode := fmCreate
diff --git a/src/base/USong.pas b/src/base/USong.pas
index bff39a29..041f3853 100644
--- a/src/base/USong.pas
+++ b/src/base/USong.pas
@@ -989,6 +989,10 @@ begin
//Add Mp3 Flag to Done
Done := Done or 4;
+ end
+ else
+ begin
+ Log.LogError('Can''t find audio file in song: ' + DecodeStringUTF8(FullFileName, Encoding));
end;
end