[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MCL 2.0.1 on PowerMac with Sys7.5



At 2:11 PM 12/13/94, Paulus Chu wrote:
>Can anyone change the volume name of a disk in MCL under system 7.5?
>
>I have a function works fine on Quadra800 with system 7.1.1.
>(defun change-volume-name (from-path to-path)
>  (ccl::%stack-iopb (pb np)
>    (ccl::%put-volume-name np from-path)
>    (%put-word pb (if (ccl::%izerop (%get-byte np)) 0 -1) $ioVolIndex)
>    (%put-word pb 0 $ioVRefNum)
>    (ccl::file-errchk (#_HGetVInfo pb) from-path)
>    (ccl::%put-volume-name np to-path)
>    (ccl::file-errchk (#_SetVInfo pb) to-path)))
>
>On PowerMac 8100 with system 7.5, the symptom is:
>?  ;;; try to rename an optical disk from "old-vol" to "new-vol"
>? (probe-file "old-vol:")
>#P"old-vol:"
>? (probe-file "new-vol:")
>NIL
>? (change-volume-name "old-vol:" "new-vol:")
>NIL
>? (probe-file "old-vol:")
>NIL
>? (probe-file "new-vol:")
>#P"old-vol:"
>? 
>
>Seems like it create an alias within MCL rather than actually changing the
>volume name...
>Any clue!?

The Think Reference entry for PBSetVInfo says that if you change the
volume name with this command, the Finder and standard file package
may not notice the change right away. It suggests using PBRename
(#_Rename) instead.