mirror of
https://github.com/fadden/ciderpress.git
synced 2025-01-02 15:30:02 +00:00
Added raw filename to A2File and children. Handled in RDOS and DOS types, especially.
This commit is contained in:
parent
95c0ec7348
commit
fd4ac77bcf
@ -835,6 +835,9 @@ DIError DiskFSDOS33::ProcessCatalogSector(int catTrack, int catSect,
|
||||
break;
|
||||
}
|
||||
|
||||
memcpy(pFile->fRawName, &pEntry[0x03], A2FileDOS::kMaxFileName);
|
||||
pFile->fRawName[A2FileDOS::kMaxFileName] = '\0';
|
||||
|
||||
memcpy(pFile->fFileName, &pEntry[0x03], A2FileDOS::kMaxFileName);
|
||||
pFile->fFileName[A2FileDOS::kMaxFileName] = '\0';
|
||||
pFile->FixFilename();
|
||||
|
@ -1474,6 +1474,9 @@ public:
|
||||
* means that embedded nulls in HFS filenames (which are discouraged but
|
||||
* allowed) will be lost.
|
||||
*
|
||||
* The original unmodified filename is availale through GetRawFileName,
|
||||
* though HFS still suffers from embedded nulls.
|
||||
*
|
||||
* We do guarantee that the contents of subdirectories are grouped
|
||||
* together. This makes it much easier to construct a hierarchy out of
|
||||
* the linear list. This becomes important when dynamically adding
|
||||
@ -1481,6 +1484,9 @@ public:
|
||||
*/
|
||||
virtual const char* GetFileName(void) const = 0; // name of this file
|
||||
virtual const char* GetPathName(void) const = 0; // full path
|
||||
virtual const char* GetRawFileName(void) const { // get unmodified file name
|
||||
return GetFileName();
|
||||
}
|
||||
virtual char GetFssep(void) const = 0; // '\0' if none
|
||||
virtual uint32_t GetFileType(void) const = 0;
|
||||
virtual uint32_t GetAuxType(void) const = 0;
|
||||
|
@ -1444,6 +1444,7 @@ public:
|
||||
*/
|
||||
virtual const char* GetFileName(void) const override { return fFileName; }
|
||||
virtual const char* GetPathName(void) const override { return fFileName; }
|
||||
virtual const char* GetRawFileName(void) const override { return fRawFileName; }
|
||||
virtual char GetFssep(void) const override { return '\0'; }
|
||||
virtual uint32_t GetFileType(void) const override;
|
||||
virtual uint32_t GetAuxType(void) const override { return fAuxType; }
|
||||
@ -1482,6 +1483,7 @@ private:
|
||||
short fTSListSector;
|
||||
uint16_t fLengthInSectors;
|
||||
bool fLocked;
|
||||
char fRawFileName[kMaxFileName + 1]; // "raw" version
|
||||
char fFileName[kMaxFileName+1]; // "fixed" version
|
||||
FileType fFileType;
|
||||
|
||||
@ -2493,6 +2495,7 @@ public:
|
||||
*/
|
||||
virtual const char* GetFileName(void) const override { return fFileName; }
|
||||
virtual const char* GetPathName(void) const override { return fFileName; }
|
||||
virtual const char* GetRawFileName(void) const override { return fRawName; }
|
||||
virtual char GetFssep(void) const override { return '\0'; }
|
||||
virtual uint32_t GetFileType(void) const override;
|
||||
virtual uint32_t GetAuxType(void) const override { return fLoadAddr; }
|
||||
@ -2518,6 +2521,7 @@ public:
|
||||
|
||||
/* fields pulled out of directory block */
|
||||
char fFileName[kMaxFileName+1];
|
||||
char fRawName[kMaxFileName + 1];
|
||||
FileType fFileType;
|
||||
uint16_t fNumSectors;
|
||||
uint16_t fLoadAddr;
|
||||
|
@ -344,6 +344,9 @@ DIError DiskFSRDOS::ReadCatalog(void)
|
||||
|
||||
pFile = new A2FileRDOS(this);
|
||||
|
||||
memcpy(pFile->fRawName, dirPtr, A2FileRDOS::kMaxFileName);
|
||||
pFile->fRawName[A2FileRDOS::kMaxFileName] = '\0';
|
||||
|
||||
memcpy(pFile->fFileName, dirPtr, A2FileRDOS::kMaxFileName);
|
||||
pFile->fFileName[A2FileRDOS::kMaxFileName] = '\0';
|
||||
pFile->FixFilename();
|
||||
|
Loading…
Reference in New Issue
Block a user