mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-11-05 04:25:09 +01:00
Fix displaying the permissions
This commit is contained in:
parent
9269c548aa
commit
0b1f944a9a
12
src/ftp.c
12
src/ftp.c
@ -446,7 +446,17 @@ static int32_t send_list(int32_t data_socket, DIR_P *iter) {
|
||||
|
||||
char timestamp[13];
|
||||
strftime(timestamp, sizeof(timestamp), "%b %d %Y", localtime(&mtime));
|
||||
snprintf(line, sizeof(line), "%crwxr-xr-x 1 0 0 %10llu %s %s\r\n", (dirent->d_type & DT_DIR) ? 'd' : '-', size, timestamp, dirent->d_name);
|
||||
snprintf(line, sizeof(line), "%c%s%s%s%s%s%s%s%s%s 1 0 0 %10llu %s %s\r\n", (dirent->d_type & DT_DIR) ? 'd' : '-',
|
||||
st.st_mode & S_IRUSR ? "r" : "-",
|
||||
st.st_mode & S_IWUSR ? "w" : "-",
|
||||
st.st_mode & S_IXUSR ? "x" : "-",
|
||||
st.st_mode & S_IRGRP ? "r" : "-",
|
||||
st.st_mode & S_IWGRP ? "w" : "-",
|
||||
st.st_mode & S_IXGRP ? "x" : "-",
|
||||
st.st_mode & S_IROTH ? "r" : "-",
|
||||
st.st_mode & S_IWOTH ? "w" : "-",
|
||||
st.st_mode & S_IXOTH ? "x" : "-",
|
||||
size, timestamp, dirent->d_name);
|
||||
if ((result = send_exact(data_socket, line, strlen(line))) < 0) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user