* fhandler.h (FH_ENC): New enum.
(fhandler_base::get_encoded): New function. (fhandler_base::set_encoded): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set encoded flag in fhandler, as appropriate. (fhandler_disk_file::readdir): Unmunge filename as appropriate based on new encoding flag. * path.cc (normalize_posix_path): Don't punt on files with colons. (special_char): New function. (mount_item::fnmunge): Ditto. (fnunmunge): Ditto. (special_name): Ditto. (mount_item::build_win32): Avoid drive considerations when file is encoded. (mount_info::conv_to_win32_path): Handle encoded filenames. (mount_info::conv_to_posix_path): Ditto. (fillout_mntent): Add posix string when directory is encoded. * path.h (fnunmunge): Declare. (path_conv::is_encoded): Declare.
This commit is contained in:
@@ -23,8 +23,7 @@ enum
|
||||
FH_WBINSET = 0x00010000, /* binary write mode has been explicitly set */
|
||||
FH_APPEND = 0x00020000, /* always append */
|
||||
FH_ASYNC = 0x00040000, /* async I/O */
|
||||
FH_SIGCLOSE = 0x00080000, /* signal handler should close fd on interrupt */
|
||||
|
||||
FH_ENC = 0x00080000, /* native path is encoded */
|
||||
FH_SYMLINK = 0x00100000, /* is a symlink */
|
||||
FH_EXECABL = 0x00200000, /* file looked like it would run:
|
||||
* ends in .exe or .bat or begins with #! */
|
||||
@@ -242,6 +241,9 @@ class fhandler_base
|
||||
bool get_need_fork_fixup () { return FHISSETF (FFIXUP); }
|
||||
void set_need_fork_fixup () { FHSETF (FFIXUP); }
|
||||
|
||||
bool get_encoded () { return FHISSETF (ENC);}
|
||||
void set_encoded () { FHSETF (ENC);}
|
||||
|
||||
virtual void set_close_on_exec (int val);
|
||||
|
||||
virtual void fixup_before_fork_exec (DWORD) {}
|
||||
|
Reference in New Issue
Block a user