fix: [Global] remove absolute path from item path

This commit is contained in:
Terrtia 2019-04-12 15:13:36 +02:00
parent 3a8631d44a
commit f2dc3bcbf4
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -46,6 +46,7 @@ if __name__ == '__main__':
p = Process(config_section)
PASTES_FOLDER = os.path.join(os.environ['AIL_HOME'], p.config.get("Directories", "pastes"))
PASTES_FOLDERS = PASTES_FOLDER + '/'
# LOGGING #
publisher.info("Feed Script started to receive & publish.")
@ -105,5 +106,9 @@ if __name__ == '__main__':
print('-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------')
'''
# remove PASTES_FOLDER from item path (crawled item + submited)
if PASTES_FOLDERS in paste:
paste = paste.replace(PASTES_FOLDERS, '', 1)
p.populate_set_out(paste)
processed_paste+=1