| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
We can just use IOFile's GetSize() function to do the same thing. While
we're at it, get rid of unnecessary variables.
|
|
|
|
|
|
We don't use it for anything, we just create it and leave it empty.
|
|
|
|
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
|
|
|
|
|
|
This apparently fixes https://bugs.dolphin-emu.org/issues/10499 somehow.
The first changed line of this commit is just for performance - the
second changed line is where the difference in behavior is.
|
|
|
|
The old way of doing it is error prone and unnecessarily complex.
|
|
|
|
Try to fix File::Copy with non-1024-byte aligned sizes
|
|
|
|
ifstream::read() sets the failbit if trying to read over the end, which
means that (!input) would be hit for the 'last' block if it wasn't
exactly BSIZE (1024) bytes.
|
|
Some code was calling more than one of these functions in a row
(in particular, FileUtil.cpp itself did it a lot...), which is
a waste since it's possible to call stat a single time and then
read all three values from the stat struct. This commit adds a
File::FileInfo class that calls stat once on construction and
then lets Exists/IsDirectory/GetSize be executed very quickly.
The performance improvement mostly matters for functions that
can be handling a lot of files, such as File::ScanDirectoryTree.
I've also done some cleanup in code that uses these functions.
For instance, some code had checks like !Exists() || !IsDirectory(),
which is functionally equivalent to !IsDirectory(), and some
code was using File::GetSize even though there was an IOFile
object that the code could call GetSize on.
|
|
stat() returns an error code in errno on both POSIX compliant
platforms and Windows.
This means we should always use errno instead of GetLastErrorMsg
which uses GetLastError() (Win32) on Windows.
|
|
POSIX allows one or more trailing slashes for directories.
From POSIX.1-2008, section 3.271 (Base Definitions / Pathname):
> A pathname can optionally contain one or more trailing <slash>
> characters. Multiple successive <slash> characters are considered to
> be the same as one <slash>, except for the case of exactly two
> leading <slash> characters.
On Windows, the extra trailing slashes are ignored for directories too.
|
|
Reduces the number of files that need to be recompiled
when making changes to FileUtil.h.
|
|
|
|
|
|
|
|
|
|
|
|
Defaults to $USERDIR/WFS. Used to store the contents normally stored on
WFS mass storage devices.
|
|
Transfer of handles should be done via std::move.
|
|
Certain parts of the standard library try to determine whether or not a
transfer operation should either be a copy or a move. The prevalent notion
of move constructors/assignment operators is that they should not throw,
they simply move an already existing resource somewhere else.
This is typically done with 'std::move_if_noexcept'. Like the name says,
if a type's move constructor is noexcept, then the functions retrieves an
r-value reference (for move semantics), or an l-value (for copy semantics)
if it is not noexcept.
As IOFile deletes the copy constructor and copy assignment operators,
using IOFile with certain parts of the standard library can fail in
unexcepted ways (especially when used with various container
implementations). This prevents that.
|
|
Common: Replace deprecated readdir_r with readdir
|
|
|
|
Fixes a warning under recent glibc.
|
|
This reverts commit 141f3bfb3acee73569486258c21e4ed34fc32327.
The implementation of getting absolute paths wasn't working
on non-Windows systems, which is a huge problem for IOS HLE.
|
|
|
|
Dolphin new Dump SSL features
|
|
Netplay: add md5 testing
|
|
Most modern Unix environments use 64-bit off_t by default: OpenBSD,
FreeBSD, OS X, and Linux libc implementations such as Musl.
glibc is the lone exception; it can default to 32 bits but this is
configurable by setting _FILE_OFFSET_BITS.
Avoiding the stat64()/fstat64() interfaces is desirable because they
are nonstandard and not implemented on many systems (including
OpenBSD and FreeBSD), and using 64 bits for stat()/fstat() is either
the default or trivial to set up.
|
|
|
|
Dump: rootca, peercert
|
|
|
|
|
|
Fixes Metroid prime crashing the second boot after loading
a save state (issue 9496)
|
|
|
|
|
|
not the variable name
|
|
|
|
UICommon: Respect XDG Base Directory Specification on POSIX systems
|
|
|