diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-09-30 05:56:29 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2007-09-30 05:56:29 +0000 |
commit | fac1634f48835f46249ec25d2758c81addd09d52 (patch) | |
tree | d8424b1b1f192a3616211dcbeb4641d918ca44d2 /Game/Code/Classes/UMain.pas | |
parent | 82621bfeb1ccbda7425b5d11b8315a9cb91509c2 (diff) | |
download | usdx-fac1634f48835f46249ec25d2758c81addd09d52.tar.gz usdx-fac1634f48835f46249ec25d2758c81addd09d52.tar.xz usdx-fac1634f48835f46249ec25d2758c81addd09d52.zip |
some minor bug fixes..
added Installer script..
for NSIS install compiler.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@451 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UMain.pas | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index 9b6ea3d5..66e1d07e 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -748,14 +748,22 @@ procedure InitializePaths; function initialize_path( out aPathVar : String; const aLocation : String ): boolean;
var
lWriteable: Boolean;
+ lAttrib : integer;
begin
- aPathVar := aLocation;
+ lWriteable := false;
+ aPathVar := aLocation;
+
+ // Make sure the directory is needex
+ ForceDirectories(aPathVar);
If DirectoryExists(aPathVar) then
- lWriteable := ForceDirectories(aPathVar)
- else
- lWriteable := false;
+ begin
+ lAttrib := fileGetAttr('C:Temp');
+ lWriteable := ( lAttrib and faDirectory <> 0 ) AND
+ NOT ( lAttrib and faReadOnly <> 0 )
+ end;
+
if not lWriteable then
Log.LogError('Error: Dir ('+ aLocation +') is Readonly');
|