comparison Resources/EmbedResources.py @ 1364:111e23bb4904 query-retrieve

integration mainline->query-retrieve
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 21 May 2015 16:58:30 +0200
parents 6e7e5ed91c2d
children 601d34afdab9
comparison
equal deleted inserted replaced
953:f894be6e7cc1 1364:111e23bb4904
1 # Orthanc - A Lightweight, RESTful DICOM Store 1 # Orthanc - A Lightweight, RESTful DICOM Store
2 # Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege, 2 # Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
3 # Belgium 3 # Department, University Hospital of Liege, Belgium
4 # 4 #
5 # This program is free software: you can redistribute it and/or 5 # This program is free software: you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as 6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation, either version 3 of the 7 # published by the Free Software Foundation, either version 3 of the
8 # License, or (at your option) any later version. 8 # License, or (at your option) any later version.
84 if os.path.isdir(pathName): 84 if os.path.isdir(pathName):
85 # The resource is a directory: Recursively explore its files 85 # The resource is a directory: Recursively explore its files
86 content = {} 86 content = {}
87 for root, dirs, files in os.walk(pathName): 87 for root, dirs, files in os.walk(pathName):
88 base = os.path.relpath(root, pathName) 88 base = os.path.relpath(root, pathName)
89
90 # Fix issue #24 (Build fails on OSX when directory has .DS_Store files):
91 # Ignore folders whose name starts with a dot (".")
92 if base.find('/.') != -1:
93 print('Ignoring folder: %s' % root)
94 continue
95
89 for f in files: 96 for f in files:
90 if f.find('~') == -1: # Ignore Emacs backup files 97 if f.find('~') == -1: # Ignore Emacs backup files
91 if base == '.': 98 if base == '.':
92 r = f 99 r = f
93 else: 100 else: