mirror of
https://github.com/joel16/VitaShell.git
synced 2024-11-23 03:39:39 +00:00
Allow more dir levels
This commit is contained in:
parent
92b1ec481e
commit
a4829945cc
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "browser.h"
|
||||
#include "archive.h"
|
||||
#include "psarc.h"
|
||||
#include "file.h"
|
||||
|
16
browser.c
16
browser.c
@ -108,11 +108,14 @@ static void storeSymlinkPath(SymlinkDirectoryPath * path) {
|
||||
}
|
||||
|
||||
void dirLevelUp() {
|
||||
base_pos_list[dir_level] = base_pos;
|
||||
rel_pos_list[dir_level] = rel_pos;
|
||||
dir_level++;
|
||||
base_pos_list[dir_level] = 0;
|
||||
rel_pos_list[dir_level] = 0;
|
||||
if (dir_level < MAX_DIR_LEVELS - 1) {
|
||||
base_pos_list[dir_level] = base_pos;
|
||||
rel_pos_list[dir_level] = rel_pos;
|
||||
dir_level++;
|
||||
base_pos_list[dir_level] = 0;
|
||||
rel_pos_list[dir_level] = 0;
|
||||
}
|
||||
|
||||
base_pos = 0;
|
||||
rel_pos = 0;
|
||||
}
|
||||
@ -234,6 +237,9 @@ static void dirUp() {
|
||||
dir_level = 0;
|
||||
|
||||
DIR_UP_RETURN:
|
||||
if (dir_level < 0)
|
||||
dir_level = 0;
|
||||
|
||||
base_pos = (int)base_pos_list[dir_level];
|
||||
rel_pos = (int)rel_pos_list[dir_level];
|
||||
dirUpCloseArchive();
|
||||
|
@ -19,6 +19,11 @@
|
||||
#ifndef __BROWSER_H__
|
||||
#define __BROWSER_H__
|
||||
|
||||
#define MAX_DIR_LEVELS 128
|
||||
|
||||
#define HOME_PATH "home"
|
||||
#define DIR_UP ".."
|
||||
|
||||
extern FileList file_list, mark_list, copy_list, install_list;
|
||||
|
||||
extern char cur_file[MAX_PATH_LENGTH];
|
||||
|
4
file.h
4
file.h
@ -26,14 +26,10 @@
|
||||
#define MAX_NAME_LENGTH 256
|
||||
#define MAX_SHORT_NAME_LENGTH 64
|
||||
#define MAX_MOUNT_POINT_LENGTH 16
|
||||
#define MAX_DIR_LEVELS 32
|
||||
|
||||
#define DIRECTORY_SIZE (4 * 1024)
|
||||
#define TRANSFER_SIZE (128 * 1024)
|
||||
|
||||
#define HOME_PATH "home"
|
||||
#define DIR_UP ".."
|
||||
|
||||
#define SYMLINK_HEADER_SIZE 4
|
||||
#define SYMLINK_MAX_SIZE (SYMLINK_HEADER_SIZE + MAX_PATH_LENGTH)
|
||||
#define SYMLINK_EXT "lnk"
|
||||
|
Loading…
Reference in New Issue
Block a user