mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 18:09:17 +01:00
.. in subdir of root always links to cluster 0
This commit is contained in:
parent
76a9624d2e
commit
eafce2e122
@ -427,6 +427,11 @@ int _FAT_mkdir_r (struct _reent *r, const char *path, int mode) {
|
||||
|
||||
|
||||
// Create the double dot entry within the directory
|
||||
|
||||
// if ParentDir == Rootdir then ".."" always link to Cluster 0
|
||||
if(parentCluster == partition->rootDirCluster)
|
||||
parentCluster = FAT16_ROOT_DIR_CLUSTER;
|
||||
|
||||
newEntryData[DIR_ENTRY_name + 1] = '.';
|
||||
u16_to_u8array (newEntryData, DIR_ENTRY_cluster, parentCluster);
|
||||
u16_to_u8array (newEntryData, DIR_ENTRY_clusterHigh, parentCluster >> 16);
|
||||
|
Loading…
Reference in New Issue
Block a user