OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 #include "DefaultFileSystem.h" | 18 #include "DefaultFileSystem.h" |
19 #include <cstdio> | 19 #include <cstdio> |
20 #include <cstring> | 20 #include <cstring> |
21 #include <fstream> | 21 #include <fstream> |
22 #include <sstream> | 22 #include <sstream> |
23 #include <stdexcept> | 23 #include <stdexcept> |
24 #include <thread> | |
25 | 24 |
26 #include <sys/types.h> | 25 #include <sys/types.h> |
27 | 26 |
28 #ifdef _WIN32 | 27 #ifdef _WIN32 |
29 #include <windows.h> | 28 #include <windows.h> |
30 #include <Shlobj.h> | 29 #include <Shlobj.h> |
31 #include <Shlwapi.h> | 30 #include <Shlwapi.h> |
32 #else | 31 #else |
33 #include <sys/stat.h> | 32 #include <sys/stat.h> |
34 #include <cerrno> | 33 #include <cerrno> |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 error = "Unknown error while calling stat on " + fileName + " as " + Resol
ve(fileName); | 309 error = "Unknown error while calling stat on " + fileName + " as " + Resol
ve(fileName); |
311 } | 310 } |
312 callback(StatResult(), error); | 311 callback(StatResult(), error); |
313 }); | 312 }); |
314 } | 313 } |
315 | 314 |
316 std::string DefaultFileSystem::Resolve(const std::string& fileName) const | 315 std::string DefaultFileSystem::Resolve(const std::string& fileName) const |
317 { | 316 { |
318 return syncImpl->Resolve(fileName); | 317 return syncImpl->Resolve(fileName); |
319 } | 318 } |
OLD | NEW |