Remove temporary directory for file downloading

This commit is contained in:
Naoki Takezoe
2016-12-28 17:39:13 +09:00
parent 572ea5bf47
commit 64f15e015f
2 changed files with 0 additions and 11 deletions

View File

@@ -683,11 +683,6 @@ trait RepositoryViewerControllerBase extends ControllerBase {
private def archiveRepository(name: String, suffix: String, repository: RepositoryService.RepositoryInfo): Unit = {
val revision = name.stripSuffix(suffix)
val workDir = getDownloadWorkDir(repository.owner, repository.name, session.getId)
if(workDir.exists) {
FileUtils.deleteDirectory(workDir)
}
workDir.mkdirs
val filename = repository.name + "-" +
(if(revision.length == 40) revision.substring(0, 10) else revision).replace('/', '_') + suffix

View File

@@ -72,12 +72,6 @@ object Directory {
*/
def getPluginCacheDir(): File = new File(s"${TemporaryHome}/_plugins")
/**
* Temporary directory which is used to create an archive to download repository contents.
*/
def getDownloadWorkDir(owner: String, repository: String, sessionId: String): File =
new File(getTemporaryDir(owner, repository), s"download/${sessionId}")
/**
* Substance directory of the wiki repository.
*/