refactor: use dataPath variable as given in file config (#1118)
* Actually use path variables as given in default config * Drop paths.content, avoid populating the global WIKI object
This commit is contained in:
		
				
					committed by
					
						
						Nicolas Giard
					
				
			
			
				
	
			
			
			
						parent
						
							5b36988d6d
						
					
				
				
					commit
					8000ebec8f
				
			@@ -9,7 +9,7 @@ module.exports = async () => {
 | 
			
		||||
  WIKI.logger.info('Purging orphaned upload files...')
 | 
			
		||||
 | 
			
		||||
  try {
 | 
			
		||||
    const uplTempPath = path.resolve(process.cwd(), WIKI.config.paths.data, 'uploads')
 | 
			
		||||
    const uplTempPath = path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'uploads')
 | 
			
		||||
    await fs.ensureDir(uplTempPath)
 | 
			
		||||
    const ls = await fs.readdir(uplTempPath)
 | 
			
		||||
    const fifteenAgo = moment().subtract(15, 'minutes')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user