comparison Resources/EmbedResources.py @ 3786:3801435e34a1 SylvainRouquette/fix-issue169-95b752c

integration Orthanc-1.6.0->SylvainRouquette
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 19 Mar 2020 11:48:30 +0100
parents 94f4a18a79cc
children 100fbe970762
comparison
equal deleted inserted replaced
3785:763533d6dd67 3786:3801435e34a1
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Orthanc - A Lightweight, RESTful DICOM Store 3 # Orthanc - A Lightweight, RESTful DICOM Store
4 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics 4 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
5 # Department, University Hospital of Liege, Belgium 5 # Department, University Hospital of Liege, Belgium
6 # Copyright (C) 2017-2019 Osimis S.A., Belgium 6 # Copyright (C) 2017-2020 Osimis S.A., Belgium
7 # 7 #
8 # This program is free software: you can redistribute it and/or 8 # This program is free software: you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as 9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation, either version 3 of the 10 # published by the Free Software Foundation, either version 3 of the
11 # License, or (at your option) any later version. 11 # License, or (at your option) any later version.
99 99
100 if os.path.isdir(pathName): 100 if os.path.isdir(pathName):
101 # The resource is a directory: Recursively explore its files 101 # The resource is a directory: Recursively explore its files
102 content = {} 102 content = {}
103 for root, dirs, files in os.walk(pathName): 103 for root, dirs, files in os.walk(pathName):
104 dirs.sort()
105 files.sort()
104 base = os.path.relpath(root, pathName) 106 base = os.path.relpath(root, pathName)
105 107
106 # Fix issue #24 (Build fails on OSX when directory has .DS_Store files): 108 # Fix issue #24 (Build fails on OSX when directory has .DS_Store files):
107 # Ignore folders whose name starts with a dot (".") 109 # Ignore folders whose name starts with a dot (".")
108 if base.find('/.') != -1: 110 if base.find('/.') != -1: