Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#5474 closed Bugs (wontfix)

filesystem::is_directory throws an excetion when the volume does not exist

Reported by: Bela Babik <bela.babik@…> Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

Windows specific problem: "bool not_found_error(int errval)" in libs/filesystem/v3/src/operations.cpp does not include the ERROR_UNRECOGNIZED_VOLUME code.

Change History (2)

comment:1 by Beman Dawes, 12 years ago

Resolution: wontfix
Status: newclosed

Microsoft defines ERROR_UNRECOGNIZED_VOLUME as "The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupted."

This looks like an error to me, and not something that should be swept under the rug. Thus I'm going to close it as wontfix.

If you have a strong motivating case for why this shouldn't be treated as an error, please feel free to reopen the ticket. But I'd really need to know what the real-world use case is before making any change.

Thanks,

--Beman

comment:2 by Bela Babik <bela.babik@…>, 12 years ago

"This looks like an error to me, and not something that should be swept under the rug. Thus I'm going to close it as wontfix."

The library does not throw an exception on Linux systems when a directory does not exists because a volume is not mounted. This is the same situation, the drive is not present (or the filesystem can not be used by the OS).

is_directory("M:\slalala") throws and exception on Windows when M: is not mounted, is_directory("/mnt/vol1/slalala") does not on Linux.

I think the behaviour is inconsistent.

Note: See TracTickets for help on using tickets.