update uploads
This commit is contained in:
parent
3fb1a968e5
commit
25b9a3c3cc
@ -11,7 +11,7 @@ repositories{
|
||||
|
||||
dependencies{
|
||||
implementation(spclibs.kotlin.gradle)
|
||||
implementation("com.github.mwiede:jsch:0.2.1")
|
||||
implementation("com.github.mwiede:jsch:0.2.9")
|
||||
}
|
||||
|
||||
gradlePlugin{
|
||||
|
@ -14,7 +14,7 @@ private fun ChannelSftp.recursiveFolderUpload(sourceFile: File, destinationPath:
|
||||
cd(destinationPath)
|
||||
if (!sourceFile.name.startsWith(".")) put(
|
||||
FileInputStream(sourceFile),
|
||||
sourceFile.getName(),
|
||||
sourceFile.name,
|
||||
ChannelSftp.OVERWRITE
|
||||
)
|
||||
} else {
|
||||
@ -32,13 +32,13 @@ private fun ChannelSftp.recursiveFolderUpload(sourceFile: File, destinationPath:
|
||||
|
||||
// else create a directory
|
||||
if (attrs != null) {
|
||||
println("Directory $directoryPath exists IsDir=${attrs.isDir()}")
|
||||
println("Directory $directoryPath exists IsDir=${attrs.isDir}")
|
||||
} else {
|
||||
println("Creating directory $directoryPath")
|
||||
mkdir(sourceFile.getName())
|
||||
mkdir(sourceFile.name)
|
||||
}
|
||||
for (f in files) {
|
||||
recursiveFolderUpload(f, destinationPath + "/" + sourceFile.getName())
|
||||
recursiveFolderUpload(f, destinationPath + "/" + sourceFile.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user