mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-19 01:25:05 -04:00
Fixes
This commit is contained in:
parent
f291dd0023
commit
5d58207ff4
@ -93,6 +93,10 @@ public:
|
|||||||
data[_size++] = element;
|
data[_size++] = element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pop_back(){
|
||||||
|
--_size;
|
||||||
|
}
|
||||||
|
|
||||||
void clear(){
|
void clear(){
|
||||||
_size = 0;
|
_size = 0;
|
||||||
}
|
}
|
||||||
|
@ -206,8 +206,6 @@ vector<disks::file> fat32::ls(dd disk, const disks::partition_descriptor& partit
|
|||||||
|
|
||||||
unique_heap_array<cluster_entry> current_cluster(16 * fat_bs->sectors_per_cluster);
|
unique_heap_array<cluster_entry> current_cluster(16 * fat_bs->sectors_per_cluster);
|
||||||
|
|
||||||
k_print_line(path.size());
|
|
||||||
|
|
||||||
if(read_sectors(disk, cluster_addr, fat_bs->sectors_per_cluster, current_cluster.get())){
|
if(read_sectors(disk, cluster_addr, fat_bs->sectors_per_cluster, current_cluster.get())){
|
||||||
for(auto& p : path){
|
for(auto& p : path){
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
@ -490,7 +490,13 @@ void cd_command(const vector<string>& params){
|
|||||||
if(params.size() == 1){
|
if(params.size() == 1){
|
||||||
disks::current_directory().clear();
|
disks::current_directory().clear();
|
||||||
} else {
|
} else {
|
||||||
disks::current_directory().push_back(params[1]);
|
if(params[1] == ".."){
|
||||||
|
if(disks::current_directory().size() > 0){
|
||||||
|
disks::current_directory().pop_back();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
disks::current_directory().push_back(params[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user