Directories need the execution bit on OSX
This commit is contained in:
parent
606d4485c8
commit
1f1a4fe1a9
|
@ -56,7 +56,7 @@ public class FSTDataProviderContainer implements FuseContainer {
|
|||
@Override
|
||||
public int getattr(String path, FileStat stat) {
|
||||
if (path.equals("/")) {
|
||||
stat.st_mode.set(FileStat.S_IFDIR | FileStat.ALL_READ);
|
||||
stat.st_mode.set(FileStat.S_IFDIR | 0755);
|
||||
stat.st_nlink.set(2);
|
||||
return 0;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class FSTDataProviderContainer implements FuseContainer {
|
|||
if (entryOpt.isPresent()) {
|
||||
FSTEntry entry = entryOpt.get();
|
||||
if (entry.isDir()) {
|
||||
stat.st_mode.set(FileStat.S_IFDIR | FileStat.ALL_READ);
|
||||
stat.st_mode.set(FileStat.S_IFDIR | 0755);
|
||||
stat.st_nlink.set(2);
|
||||
} else {
|
||||
stat.st_mode.set(FileStat.S_IFREG | FileStat.ALL_READ);
|
||||
|
|
|
@ -87,14 +87,14 @@ public abstract class GroupFuseContainer implements FuseContainer {
|
|||
public int getattr(String path, FileStat stat) {
|
||||
path.replace("\\", "/");
|
||||
if (path.equals("/")) {
|
||||
stat.st_mode.set(FileStat.S_IFDIR | FileStat.ALL_READ);
|
||||
stat.st_mode.set(FileStat.S_IFDIR | 0755);
|
||||
stat.st_nlink.set(2);
|
||||
return 0;
|
||||
}
|
||||
if (path.split("/").length == 2) {
|
||||
for (String container : containerMap.keySet()) {
|
||||
if (container.equals(path.split("/")[1])) {
|
||||
stat.st_mode.set(FileStat.S_IFDIR | FileStat.ALL_READ);
|
||||
stat.st_mode.set(FileStat.S_IFDIR | 0755);
|
||||
stat.st_nlink.set(2);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ public class NUSTitleEncryptedFuseContainer implements FuseContainer {
|
|||
@Override
|
||||
public int getattr(String path, FileStat stat) {
|
||||
if (path.equals("/")) {
|
||||
stat.st_mode.set(FileStat.S_IFDIR | FileStat.ALL_READ);
|
||||
stat.st_mode.set(FileStat.S_IFDIR | 0755);
|
||||
stat.st_nlink.set(2);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue