Commit Graph

11760 Commits

Author SHA1 Message Date
Max Kellermann dfcfeeb550 fs/Traits: use std::char_traits 2015-03-03 12:28:47 +01:00
Max Kellermann 820debf45a util/StringUtil: add FindStringSuffix() 2015-03-03 11:29:31 +01:00
Max Kellermann c19292c036 Util/StringUtil: use std::copy_n() 2015-03-02 22:35:59 +01:00
Max Kellermann 4ee81e6a3d PlaylistFile: limit variable scope 2015-03-02 22:19:47 +01:00
Max Kellermann 87a8a3e22f PlaylistFile: move memchr() call to class Path 2015-03-02 21:48:37 +01:00
Max Kellermann e9125ef8e4 PlaylistFile: use PathTraitsFS typedefs 2015-03-02 21:47:33 +01:00
Max Kellermann 6ff394bcc9 StorageCommands: use PathTraitsUTF8 for protocol argument 2015-03-02 21:25:55 +01:00
Max Kellermann 7ce96585f5 fs/Path: add method GetSuffix()
Type-safe wrapper for uri_get_suffix().
2015-03-01 01:09:53 +01:00
Max Kellermann 41cc31c124 SongUpdate: use OpenArchiveInputStream() to open archive file
Don't pass Path::c_str() to tag_stream_scan() which requires a UTF-8
string.
2015-03-01 00:48:44 +01:00
Max Kellermann 605af61a0f db/simple: eliminate UpdateFileInArchive() if archive API is disabled
Reduce some unnecessary overhead.
2015-03-01 00:25:30 +01:00
Max Kellermann 77e163e5b8 Mapper: use Path::IsAbsolute() 2015-02-28 23:50:18 +01:00
Max Kellermann 0e00b9009d fs/Path: pass Path to Relative() 2015-02-28 23:45:16 +01:00
Max Kellermann a6dd998d31 fs/AllocatedPath: use PathTraitsFS::Relative()
Eliminate duplicate code.
2015-02-28 23:30:53 +01:00
Max Kellermann cdd0ccc67a fs/Path: rename RelativeFS() to Relative() 2015-02-28 23:19:34 +01:00
Max Kellermann a918821868 fs/Traits: add missing dereference in RelativePathImpl() 2015-02-28 23:19:34 +01:00
Max Kellermann c637b96f10 Win32Main: use TCHAR where appropriate 2015-02-28 23:15:46 +01:00
Max Kellermann 44b9197354 Mapper: use class Path 2015-02-28 23:00:27 +01:00
Max Kellermann 7a8f96b1dd FileCommands: use PathTraitsFS typedefs 2015-02-28 23:00:26 +01:00
Max Kellermann f4f21f462d fs/CheckFile: convert path to UTF-8 for error message 2015-02-28 23:00:26 +01:00
Max Kellermann d09b8b5bd7 fs/FileInfo: use GetFileAttributesEx() on WIN32 2015-02-28 23:00:26 +01:00
Max Kellermann ee327db517 fs/FileSystem: remove unused WIN32 port of StatFile() 2015-02-28 23:00:26 +01:00
Max Kellermann 90a61b6bab fs/FileInfo: new library providing GetFileInfo()
Replaces StatFile(), with a portable data object.
2015-02-28 23:00:26 +01:00
Max Kellermann 00583bc4a8 FileCommands: skip special files completely
Previously, MPD printed the time stamp without printing the file
name.  That made no sense.
2015-02-28 23:00:26 +01:00
Max Kellermann 2d06a8e880 storage/FileInfo: rename to StorageFileInfo 2015-02-28 23:00:26 +01:00
Max Kellermann e1a434edbc fs/Path: make IsAbsolute() const 2015-02-28 23:00:26 +01:00
Max Kellermann 6b3b1cbd99 fs/FileSystem: use GetFileAttributes() on WIN32 if possible 2015-02-27 19:15:31 +01:00
Max Kellermann 4dd861ee23 fs/FileSystem: merge CheckAccess() into PathExists()
PathExists() should better do what CheckAccess() does, and
CheckAccess() doesn't do what its name implies.
2015-02-27 19:13:46 +01:00
Max Kellermann 4f0f81a047 fs/DirectoryReader: use FindFirstFile(), FindNextFile() on WIN32 2015-02-26 18:11:02 +01:00
Max Kellermann e3908c8de6 fs/Traits: add constant CURRENT_DIRECTORY 2015-02-25 19:53:35 +01:00
Max Kellermann 81c49fba03 fs/AllocatedPath: add nullptr_t constructor 2015-02-25 19:53:35 +01:00
Max Kellermann eb174d5ba3 fs/{Allocated,}Path,Charset: use PathTraitsFS typedefs 2015-02-25 19:17:45 +01:00
Max Kellermann 4c899e9c5a fs/FileSystem: remove unused FOpenModes 2015-02-25 19:17:45 +01:00
Max Kellermann 00b0f6ad51 fs/io/File{Reader,OutputStream}: convert path to UTF-8 for error message 2015-02-25 19:10:51 +01:00
Max Kellermann fe1e467a49 db/ExcludeList: use the TextFile class instead of stdio.h 2015-02-25 16:25:26 +01:00
Max Kellermann 73cb538d72 configure.ac: enable STRICT mode on Windows 2015-02-25 16:01:30 +01:00
Max Kellermann 64b9e7fd48 util/DynamicFifoBuffer: adjust include guard 2015-02-16 00:53:59 +01:00
Max Kellermann 12de22d3bb net/StaticSocketAdress: new class wrapping struct sockaddr_storage 2015-02-13 21:16:43 +01:00
Max Kellermann 821bc6d777 system/ByteOrder: use GCC built-ins if available 2015-02-12 11:05:02 +01:00
Max Kellermann 6e66a5b77b net/Resolver: relax size check in LocalAddressToString()
Handles abstract sockets on Linux.
2015-02-10 22:47:26 +01:00
Max Kellermann cf5c10bbe6 net/Resolver: move code to LocalAddressToString() 2015-02-10 22:46:04 +01:00
Max Kellermann 4e30e74739 net/SocketAddress: light wrapper for struct sockaddr 2015-02-10 22:06:06 +01:00
Max Kellermann 42890b9acf system/{Resolver,Socket{Error,Util}}: move to new library libnet.a 2015-02-10 22:06:06 +01:00
Max Kellermann 33a27379f9 Listen: add "override" 2015-02-10 22:05:57 +01:00
Max Kellermann 0cf57cc7ca event/ServerSocket: remove obsolete macro DEFAULT_PORT 2015-02-10 20:27:45 +01:00
Max Kellermann 68fcbaf4c8 event/ServerSocket: remove obsolete typedef 2015-02-10 20:24:23 +01:00
Max Kellermann 9c83d3c78c fs/io/FileOutputStream: use CREATE_ALWAYS instead of TRUNCATE_EXISTING
Fixes yet another breakage of creating the database+state file on
Windows.
2015-02-10 13:41:09 +01:00
Max Kellermann 676dfabc91 command/{Queue,File}Commands: drop "file:///" prefix for absolute paths
Requiring this prefix makes the client's intention very clear, but it
was too hard to understand why this prefix was needed.  Initially, my
intention was to differentiate from broken clients which prefix relate
URIs with a slash; once MPD allowed that.  In the past few years
however, MPD has disallowed that, and there was no significant
breakage (except for the "add /" special case which some clients
apparently still do).  So I figure it's about time to define that an
URI that begins with a slash points to an arbitrary file on the file
system.
2015-02-09 07:55:06 +01:00
Max Kellermann 60e6d1d61b fs/Charset: convert #ifdef to regular "if" 2015-02-09 07:44:21 +01:00
Max Kellermann 975e275030 fs/Charset: change FixSeparators() API to use std::string&& 2015-02-08 17:52:01 +00:00
Max Kellermann afcd5670e3 Listen: remove C-style "void" 2015-02-07 12:15:10 +00:00