mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 14:05:52 +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)
|
case Some(env) => new File(env)
|
||||||
// default is HOME/.gitbucket
|
// default is HOME/.gitbucket
|
||||||
case None => {
|
case None => {
|
||||||
// Move HOME/gitbucket to HOME/.gitbucket
|
|
||||||
val oldHome = new File(System.getProperty("user.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){
|
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
|
}).getAbsolutePath
|
||||||
|
|||||||
Reference in New Issue
Block a user