1
0
Fork 0

Fix several logic errors with regards to deleted directories.

Should fix that directories with the same length as a deleted directory had some small issues.
Also blocks the creation of files in directories marked as deleted.
Small speed up to MakeDir, so it doesn't rely on mkdir when a directory is created inside a deleted directory.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4268
This commit is contained in:
Peter Veenstra 2019-10-09 20:46:40 +00:00
parent 60204619d0
commit 19478d45f5
2 changed files with 23 additions and 10 deletions

View file

@ -426,7 +426,6 @@ public:
virtual bool FileStat(const char* name, FileStat_Block * const stat_block);
virtual void EmptyCache(void);
bool Sync_leading_dirs(const char* dos_filename);
FILE* create_file_in_overlay(char* dos_filename, char const* mode);
virtual Bits UnMount(void);
virtual bool TestDir(char * dir);
@ -435,6 +434,7 @@ public:
private:
char overlaydir[CROSS_LEN];
bool optimize_cache_v1;
bool Sync_leading_dirs(const char* dos_filename);
void add_DOSname_to_cache(const char* name);
void remove_DOSname_from_cache(const char* name);
void add_DOSdir_to_cache(const char* name);
@ -450,6 +450,7 @@ private:
void add_deleted_path(const char* name, bool create_on_disk);
void remove_deleted_path(const char* name, bool create_on_disk);
bool is_deleted_path(const char* name);
bool check_if_leading_is_deleted(const char* name);
bool is_dir_only_in_overlay(const char* name); //cached