mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-07 15:48:41 +01:00
26 lines
865 B
Diff
26 lines
865 B
Diff
diff --git src/snapshot/embedded-file-writer.cc src/snapshot/embedded-file-writer.cc
|
|
index 9612fa6..6394287 100644
|
|
--- src/snapshot/embedded-file-writer.cc
|
|
+++ src/snapshot/embedded-file-writer.cc
|
|
@@ -4,6 +4,7 @@
|
|
|
|
#include "src/snapshot/embedded-file-writer.h"
|
|
|
|
+#include <algorithm>
|
|
#include <cinttypes>
|
|
|
|
#include "src/objects/code-inl.h"
|
|
@@ -613,7 +614,11 @@
|
|
|
|
void PlatformDependentEmbeddedFileWriter::DeclareExternalFilename(
|
|
int fileid, const char* filename) {
|
|
- fprintf(fp_, ".file %d \"%s\"\n", fileid, filename);
|
|
+ // Replace any Windows style paths (backslashes) with forward
|
|
+ // slashes.
|
|
+ std::string fixed_filename(filename);
|
|
+ std::replace(fixed_filename.begin(), fixed_filename.end(), '\\', '/');
|
|
+ fprintf(fp_, ".file %d \"%s\"\n", fileid, fixed_filename.c_str());
|
|
}
|
|
|
|
void PlatformDependentEmbeddedFileWriter::FileEpilogue() {}
|