* fhandler.h (fhandler_cygdrive:DRVSZ): New enum.
(pdrive_buf): New place to hold information about cygdrive. * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Store drive info in pdrive_buf since get_win32_name() could now be too small to hold everything. (fhandler_cygdrive::rewinddir): Reset pdrive to pdrive_buf. (fhandler_cygdrive::closedir): Ditto. * pipe.cc (fhandler_pipe::init): Be more defensive when referencing get_win32_name(). Rework logic which made a copy of the POSIX path and then never used it.
This commit is contained in:
@@ -753,8 +753,13 @@ class fhandler_disk_file: public fhandler_base
|
||||
|
||||
class fhandler_cygdrive: public fhandler_disk_file
|
||||
{
|
||||
enum
|
||||
{
|
||||
DRVSZ = sizeof ("x:\\")
|
||||
};
|
||||
int ndrives;
|
||||
const char *pdrive;
|
||||
char pdrive_buf[2 * 26 * DRVSZ];
|
||||
void set_drives ();
|
||||
public:
|
||||
fhandler_cygdrive ();
|
||||
|
Reference in New Issue
Block a user