mh_mbox: fix on Windows.
The 2 main issues were that the files were fopen'd in text mode, and that the std-based SimpleRegexp implementation was wrong (match instead of search). Also, make sure that we are using 64 bits interfaces.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2004 J.F.Dockes
|
||||
/* Copyright (C) 2004-2019 J.F.Dockes
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or
|
||||
@@ -57,9 +57,9 @@
|
||||
#include "safesysstat.h"
|
||||
#include "transcode.h"
|
||||
|
||||
#define STAT _wstat
|
||||
#define LSTAT _wstat
|
||||
#define STATBUF _stat
|
||||
#define STAT _wstati64
|
||||
#define LSTAT _wstati64
|
||||
#define STATBUF _stati64
|
||||
#define ACCESS _waccess
|
||||
|
||||
#else // Not windows ->
|
||||
@@ -656,7 +656,7 @@ bool path_makepath(const string& ipath, int mode)
|
||||
path = "/";
|
||||
for (const auto& elem : elems) {
|
||||
#ifdef _WIN32
|
||||
if (path == "/" && path_strlookslikedrive(*it)) {
|
||||
if (path == "/" && path_strlookslikedrive(elem)) {
|
||||
path = "";
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user