mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45:50 +01:00
Use old home if it exists.
This commit is contained in:
@@ -17,13 +17,13 @@ object Directory {
|
||||
case Some(env) => new File(env)
|
||||
// default is HOME/.gitbucket
|
||||
case None => {
|
||||
// Move HOME/gitbucket to HOME/.gitbucket
|
||||
val oldHome = new File(System.getProperty("user.home"), "gitbucket")
|
||||
val newHome = new File(System.getProperty("user.home"), ".gitbucket")
|
||||
if(oldHome.exists && oldHome.isDirectory && new File(oldHome, "version").exists){
|
||||
FileUtils.moveDirectory(oldHome, newHome)
|
||||
//FileUtils.moveDirectory(oldHome, newHome)
|
||||
oldHome
|
||||
} else {
|
||||
new File(System.getProperty("user.home"), ".gitbucket")
|
||||
}
|
||||
newHome
|
||||
}
|
||||
}
|
||||
}).getAbsolutePath
|
||||
|
||||
Reference in New Issue
Block a user