|  |  |  | @ -40,12 +40,11 @@ class CacheViewModel(application: Application) : BaseViewModel(application) { | 
			
		
	
		
			
				
					|  |  |  |  |         val content = getAllContents(book) | 
			
		
	
		
			
				
					|  |  |  |  |         DocumentUtils.createFileIfNotExist(doc, filename) | 
			
		
	
		
			
				
					|  |  |  |  |             ?.writeText(context, content) | 
			
		
	
		
			
				
					|  |  |  |  |         if(App.INSTANCE.getPrefBoolean(PreferKey.webDavExport,false)) { | 
			
		
	
		
			
				
					|  |  |  |  |             //写出文件到cache目录 | 
			
		
	
		
			
				
					|  |  |  |  |         if(App.INSTANCE.getPrefBoolean(PreferKey.webDavCacheBackup,false)) { | 
			
		
	
		
			
				
					|  |  |  |  |             FileUtils.createFileIfNotExist( | 
			
		
	
		
			
				
					|  |  |  |  |                 File(FileUtils.getCachePath()), | 
			
		
	
		
			
				
					|  |  |  |  |                 filename | 
			
		
	
		
			
				
					|  |  |  |  |             ).writeText(content) | 
			
		
	
		
			
				
					|  |  |  |  |             ).writeText(content) // 写出文件到cache目录 | 
			
		
	
		
			
				
					|  |  |  |  |             // 导出到webdav | 
			
		
	
		
			
				
					|  |  |  |  |             WebDavHelp.exportWebDav(FileUtils.getCachePath(), filename) | 
			
		
	
		
			
				
					|  |  |  |  |             // 上传完删除cache文件 | 
			
		
	
	
		
			
				
					|  |  |  | @ -79,7 +78,7 @@ class CacheViewModel(application: Application) : BaseViewModel(application) { | 
			
		
	
		
			
				
					|  |  |  |  |         val filename = "${book.name} by ${book.author}.txt" | 
			
		
	
		
			
				
					|  |  |  |  |         FileUtils.createFileIfNotExist(file, filename) | 
			
		
	
		
			
				
					|  |  |  |  |             .writeText(getAllContents(book)) | 
			
		
	
		
			
				
					|  |  |  |  |         if(App.INSTANCE.getPrefBoolean(PreferKey.webDavExport,false)) { | 
			
		
	
		
			
				
					|  |  |  |  |         if(App.INSTANCE.getPrefBoolean(PreferKey.webDavCacheBackup,false)) { | 
			
		
	
		
			
				
					|  |  |  |  |             WebDavHelp.exportWebDav(file.absolutePath, filename) // 导出到webdav | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         App.db.bookChapterDao().getChapterList(book.bookUrl).forEach { chapter -> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |