mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Translated directory separators when running ntfscluster on Windows
Use \ as a directory separator when running on Windows.
This commit is contained in:
parent
31430ae01a
commit
6cb8913967
@ -486,6 +486,9 @@ int main(int argc, char *argv[])
|
||||
struct match m;
|
||||
int res;
|
||||
int result = 1;
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
char *unix_name;
|
||||
#endif
|
||||
|
||||
ntfs_log_set_handler(ntfs_log_handler_outerr);
|
||||
|
||||
@ -521,7 +524,17 @@ int main(int argc, char *argv[])
|
||||
result = cluster_find(vol, opts.range_begin, opts.range_end, (cluster_cb*)&print_match, NULL);
|
||||
break;
|
||||
case act_file:
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
unix_name = ntfs_utils_unix_path(opts.filename);
|
||||
ino = 0;
|
||||
if (unix_name) {
|
||||
ino = ntfs_pathname_to_inode(vol, NULL,
|
||||
unix_name);
|
||||
free(unix_name);
|
||||
}
|
||||
#else
|
||||
ino = ntfs_pathname_to_inode(vol, NULL, opts.filename);
|
||||
#endif
|
||||
if (ino)
|
||||
result = dump_file(vol, ino);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user