Directories need the execution bit on OSX

This commit is contained in:
Maschell 2019-04-13 12:56:16 +02:00
parent 606d4485c8
commit 1f1a4fe1a9
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}