forked from hardcoresushi/DroidFS
Set permissions when creating files and folders
This commit is contained in:
parent
f58517e904
commit
286253c542
@ -2,12 +2,13 @@ package sushi.hardcore.droidfs
|
||||
|
||||
import android.net.Uri
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
class ConstValues {
|
||||
companion object {
|
||||
const val creator = "DroidFS"
|
||||
const val gocryptfsConfFilename = "gocryptfs.conf"
|
||||
const val FILE_MODE = 384 //0600
|
||||
const val DIRECTORY_MODE = 448 //0700
|
||||
const val volumeDatabaseName = "SavedVolumes"
|
||||
const val sort_order_key = "sort_order"
|
||||
val fakeUri: Uri = Uri.parse("fakeuri://droidfs")
|
||||
|
@ -66,7 +66,7 @@ class GocryptfsVolume(var sessionID: Int) {
|
||||
|
||||
fun mkdir(dir_path: String): Boolean {
|
||||
synchronized(this){
|
||||
return native_mkdir(sessionID, dir_path, 0)
|
||||
return native_mkdir(sessionID, dir_path, ConstValues.DIRECTORY_MODE)
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ class GocryptfsVolume(var sessionID: Int) {
|
||||
|
||||
fun openWriteMode(file_path: String): Int {
|
||||
synchronized(this){
|
||||
return native_open_write_mode(sessionID, file_path, 0)
|
||||
return native_open_write_mode(sessionID, file_path, ConstValues.FILE_MODE)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user