ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/extfs_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/extfs_unix.cpp (file contents):
Revision 1.16 by cebix, 2001-02-02T20:52:57Z vs.
Revision 1.18 by cebix, 2002-01-15T14:58:37Z

# Line 1 | Line 1
1   /*
2   *  extfs_unix.cpp - MacOS file system for access native file system access, Unix specific stuff
3   *
4 < *  Basilisk II (C) 1997-2001 Christian Bauer
4 > *  Basilisk II (C) 1997-2002 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 218 | Line 218 | static const ext2type e2t_translation[]
218          {NULL, 0, 0}    // End marker
219   };
220  
221 < void get_finfo(const char *path, uint32 finfo, uint32 fxinfo)
221 > void get_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir)
222   {
223          // Set default finder info
224          Mac_memset(finfo, 0, SIZEOF_FInfo);
# Line 239 | Line 239 | void get_finfo(const char *path, uint32
239          }
240  
241          // No Finder info file, translate file name extension to MacOS type/creator
242 <        struct stat st;
243 <        if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) {
242 >        if (!is_dir) {
243                  int path_len = strlen(path);
244                  for (int i=0; e2t_translation[i].ext; i++) {
245                          int ext_len = strlen(e2t_translation[i].ext);
# Line 255 | Line 254 | void get_finfo(const char *path, uint32
254          }
255   }
256  
257 < void set_finfo(const char *path, uint32 finfo, uint32 fxinfo)
257 > void set_finfo(const char *path, uint32 finfo, uint32 fxinfo, bool is_dir)
258   {
259          // Open Finder info file
260          int fd = open_finf(path, O_RDWR);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines