changeset 2576:4555a8ef2e88

escape colons in path
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 11 May 2018 08:37:32 +0200
parents fcf447be9e97
children 174618206d2b
files Resources/Samples/Lua/WriteToDisk.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/Samples/Lua/WriteToDisk.lua	Wed May 09 15:57:44 2018 +0200
+++ b/Resources/Samples/Lua/WriteToDisk.lua	Fri May 11 08:37:32 2018 +0200
@@ -2,7 +2,8 @@
 
 function ToAscii(s)
    -- http://www.lua.org/manual/5.1/manual.html#pdf-string.gsub
-   return s:gsub('[^a-zA-Z0-9-/ ]', '_')
+   -- https://groups.google.com/d/msg/orthanc-users/qMLgkEmwwPI/6jRpCrlgBwAJ
+   return s:gsub('[^a-zA-Z0-9-/-: ]', '_')
 end
 
 function OnStableSeries(seriesId, tags, metadata)