Steve Checkoway
c13b0bcb4a
Missed one 64 bit to 32 bit conversion.
2008-11-24 07:55:11 +00:00
Steve Checkoway
0efbd42aa3
Make explicit the conversion from 64 bits to 32 bits. In the case of files, perhaps we should be using an appropriate type such as off_t rather than int. I am not sure if anyone would actually want to use files larger than 2 GB with SM, but it seems possible while using .smzip.
2008-11-24 07:52:55 +00:00
Glenn Maynard
1b98e724ba
in SLOW_FLUSH, flush the dir after the rename; this won't prevent corruption, but avoid returning to the caller until the change is fully committed to disk (before, we could reboot after returning and return to a previous version of the file)
2008-10-28 08:39:50 +00:00
Glenn Maynard
df75eb2cf7
fix file.Open("."); file.GetFileSize() asserts
2008-01-11 02:09:11 +00:00
Steve Checkoway
270f537b74
Fix build.
2007-04-24 08:56:05 +00:00
Chris Danford
79fd5b35fd
don't use macros with variable number of arguments - no version of VC supports it
...
use existing WARN macro which falls back to printf if LOG isn't yet constructed
2007-04-24 05:24:14 +00:00
John Bauer
ee0c5123b1
Fix the build: standard macro arg lists use ... and __VA_ARGS__ but do
...
not allow specific names for the arg lists.
2007-04-23 16:35:17 +00:00
Steve Checkoway
4c614ae701
The file drivers are one of the few things that can be accessed before LOG is set up, guard all accesses.
2007-04-23 05:52:51 +00:00
Glenn Maynard
53dcc71e11
don't log from here. This is used from Write, so write errors in logging
...
are causing infinite recursion.
2007-03-09 18:27:02 +00:00
Glenn Maynard
c6b17932fa
debugging
2006-12-29 09:55:28 +00:00
Glenn Maynard
7a95f5da5b
covariant Copy()
2006-10-20 00:01:18 +00:00
Glenn Maynard
b77024f3bc
include
2006-09-18 22:45:42 +00:00
Glenn Maynard
96c05aae34
Move write buffering from RageFileObjDirect to RageFileObj; enable
...
it for RageFileDriverTimeout, too.
2006-02-28 07:43:54 +00:00
Glenn Maynard
0e66237817
low-level WriteInternal() shouldn't call higher-level Flush()
2006-02-28 06:09:38 +00:00
Chris Danford
1fcfc22981
CString -> RString
...
const string params where possible for easier debug stepping
2005-12-28 03:59:52 +00:00
Glenn Maynard
40542977f1
style
2005-12-13 03:33:32 +00:00
Glenn Maynard
343c4d106c
fix temp file still overwrites actual file, if a Write or Flush has failed
2005-12-06 17:38:27 +00:00
Glenn Maynard
452e8c1e74
cleanup
2005-12-06 17:35:40 +00:00
Glenn Maynard
6c2475399a
cleanup
2005-12-06 17:12:18 +00:00
Glenn Maynard
f99fa91bf9
If we didn't rename the temporary file, delete it.
2005-12-06 17:09:34 +00:00
Glenn Maynard
dff9a680b5
simplify
2005-12-06 17:07:21 +00:00
Glenn Maynard
8ab36ad2a0
If the flush fails, don't clear the buffer. That way, if Flush() is called multiple
...
times, and for some reason it succeeds on the second call (eg. more disk
space is now available), we don't lose that data.
2005-12-06 16:23:38 +00:00
Glenn Maynard
445074885a
cleanup
2005-12-06 16:22:11 +00:00
Glenn Maynard
08bbfd215d
work around VC brain damage
2005-09-29 06:35:30 +00:00
Glenn Maynard
04ec4e66f4
add optional RageFileDriver::MoveFile override; implement for RageFileDriverDirect and RageFileDriverTimeout
2005-09-28 22:59:12 +00:00
Glenn Maynard
7c7c547131
missing headers
2005-09-03 21:26:04 +00:00
Renaud Lepage
4cf9334b9f
Xbox : Correct the path correction routine. We are now back.
2005-08-26 19:02:10 +00:00
Glenn Maynard
162d235691
cleanup
2005-06-05 15:15:55 +00:00
Glenn Maynard
c14c03c351
cleanup
2005-06-01 23:47:56 +00:00
Glenn Maynard
7e1b549eb7
umask fix
2005-05-31 23:26:07 +00:00
Glenn Maynard
edf10cb9b3
remove RageFileDriver::Ready
2005-05-31 21:58:21 +00:00
Glenn Maynard
209040e02d
clean up file drivers: drivers now always receive paths with trailing slashes;
...
this makes handling the relative "root" directory not a special case (".").
mountpoints now always begin with a slash. before, "/foo" and "foo" were
in two separate namespaces, which was weird and confusing; the two now
mean the same thing. there are no more special "default mountpoints"; just
mount to "/". "@path" mounts are now "/@path", and they do show up in
GetDirListing("/") (but, as before, opening "/@foo/bar" will never create
a "@foo/bar" path in a non-"@foo" mountpoint)
2005-05-20 22:26:54 +00:00
Glenn Maynard
7df474b776
make remount work
2005-01-27 03:54:49 +00:00
Glenn Maynard
67d5bfd6d5
RageFileManager::Remount
2005-01-27 03:43:55 +00:00
Glenn Maynard
ae92b86b34
RageFileBasic
2004-12-11 02:25:38 +00:00
Glenn Maynard
47994102b3
vc fix?
2004-12-10 13:13:14 +00:00
Glenn Maynard
8915e3944a
simplify; use RageBasicFile instead of RageFileObj
2004-12-10 10:04:32 +00:00
Glenn Maynard
287a150db7
Move buffering logic from RageFile into RageFileObj.
...
Common file interface class, RageBasicFile, shared by RageFile
and RageFileObj. This makes most uses of these objects interchangeable.
RageFile is now just a simple wrapper for RageFileObj, to create
files in FILEMAN's namespace; file objects can also be created
independently. This means that, for example, IniFile can be used
to write a file to a CString, without having to jump through hoops,
and without having to use a separate file access wrapper; just do
something like:
RageFileObjMem string_file;
ini.WriteFile( string );
const CString &sString = string_file.GetString();
2004-12-10 08:48:18 +00:00
Glenn Maynard
e2ea72dbac
internalize RageFileObj implementation functions
2004-12-10 03:14:01 +00:00
Glenn Maynard
ec22ffec62
stop passing ugly back-references to the RageFile to RageFileObj
2004-12-09 11:47:20 +00:00
Glenn Maynard
bb94a3aaa1
cleanup: avoid parent access
2004-12-09 11:28:24 +00:00
Glenn Maynard
6761eb7a51
remove Rewind()
2004-12-09 10:44:07 +00:00
Glenn Maynard
b1d8c97359
(how did that happen?)
2004-10-06 18:11:10 +00:00
Glenn Maynard
12c21c302c
error checks to trace https://sourceforge.net/tracker/index.php?func=detail&aid=1035264&group_id=37892&atid=421366
...
fix error message
2004-10-06 04:25:27 +00:00
Glenn Maynard
246281574d
fix infinite recursion when LogCheckpoints
2004-10-05 14:59:30 +00:00
Glenn Maynard
5e41e72e51
comment
2004-09-01 23:12:20 +00:00
Glenn Maynard
571af53ea8
ZIP reading fixes
2004-06-23 05:15:47 +00:00
Glenn Maynard
33a04b79de
beginning GPL->X11 license transition
...
The conventions I'm using are to put the entire copyright notice at the bottom
of each file, and to put the summary of the source file's use at the top of the
header.
Putting the license text in each file avoids confusion, and is normal practice
for many projects. Putting it at the bottom gets it out of the way; it's a
ton of clutter to put at the top.
The description is in the header. People who don't know what a class is for,
or how to use it, are probably looking at the header to see the interface,
not the implementation, so let's put the description in there. Keep it brief
(one line); any substantial implementation notes should go in the source file.
2004-05-06 00:42:06 +00:00
Glenn Maynard
df9c4cbd6e
fix failed writes to "foo.sm" leaving "new.foo.sm" behind, which will
...
trigger an error on the next load
2004-04-19 22:19:54 +00:00
Glenn Maynard
79ac1ae2c6
directory flushing doesn't work in windows
2004-04-19 21:00:18 +00:00