diff OrthancServer/Resources/PreventProtobufDirectoryLeaks.py @ 5360:165b67c02927

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 06 Jul 2023 21:08:05 +0200
parents fddb5d8d0021
children 48b8dae6dc77
line wrap: on
line diff
--- a/OrthancServer/Resources/PreventProtobufDirectoryLeaks.py	Thu Jul 06 19:40:13 2023 +0200
+++ b/OrthancServer/Resources/PreventProtobufDirectoryLeaks.py	Thu Jul 06 21:08:05 2023 +0200
@@ -31,8 +31,9 @@
 s = s.replace('__FILE__', '__ORTHANC_FILE__')
 
 s = """
-#undef __FILE__
-#define __FILE__ __ORTHANC_FILE__
+#if !defined(__ORTHANC_FILE__)
+#  define __ORTHANC_FILE__ __FILE__
+#endif
 """ + s
 
 with open(sys.argv[1], 'w') as f: