[REBOL] set-modes problems
From: D::Weyand::gmx::de at: 31-Oct-2006 13:30
Hello list,
I have some problems with set-modes for directories using REBOL/View on WindowsXP and
asking for your help and advice.
See below code and console log for reproducing the problem:
set-file-attrib: func [
file [url! file!]
attr [block!]
][
foreach [flag val] attr [
probe foo: compose [(flag) (val)]
if error? err: try [set-modes file foo none][probe disarm err]
]
]
>> system/version
== 1.3.2.3.1
>> make-dir/deep d1: %foo/testdir1
== %foo/testdir1/
>> make-dir/deep d2: %foo/testdir2
== %foo/testdir2/
>> write f1: %foo/testfile1.txt "foo1"
>> write f2: %foo/testfile2.txt "foo2"
>> modes: get-modes f1 'file-modes
== [creation-date access-date modification-date owner-write archived hidden system]
>> attrib: get-modes file1 modes
== [creation-date: 31-Oct-2006/12:37:12+1:00 access-date: 31-Oct-2006/12:44:15+1:00 modification-date:
31-Oct-2006/1
2:44:15+1:00 ow...
>> set-modes f2 attrib
>> equal? attrib get-modes file2 modes
== true
>> attrib: get-modes d1 modes
== [creation-date: 31-Oct-2006/12:36:35+1:00 access-date: 31-Oct-2006/12:36:35+1:00 modification-date:
31-Oct-2006/
12:36:35+1:00 ow...
>> set-modes d2 attrib
** Access Error: Cannot open /C/temp/REBOL/Scripts/foo/foo/testdir2
** Where: shutdown
** Near: set-modes d2 attrib
>> set-file-attrib d2 attrib
[creation-date: 31-Oct-2006/12:36:35+1:00]
make object! [
code: 500
type: 'access
id: 'cannot-open
arg1: "/C/temp/REBOL/Scripts/foo/foo/testdir2"
arg2: none
arg3: none
near: [set-modes file foo none]
where: 'set-file-attrib
]
[access-date: 31-Oct-2006/12:36:35+1:00]
make object! [
code: 500
type: 'access
id: 'cannot-open
arg1: "/C/temp/REBOL/Scripts/foo/foo/testdir2"
arg2: none
arg3: none
near: [set-modes file foo none]
where: 'set-file-attrib
]
[modification-date: 31-Oct-2006/12:36:35+1:00]
make object! [
code: 500
type: 'access
id: 'cannot-open
arg1: "/C/temp/REBOL/Scripts/foo/foo/testdir2"
arg2: none
arg3: none
near: [set-modes file foo none]
where: 'set-file-attrib
]
[owner-write: true]
[archived: false]
[hidden: false]
[system: false]
== none
Do you know why itīs not possible to change the date attributes for directories with
set-modes? It worked fine for files, why not for directories on WinXP?
I donīt get those error messages on MacOS X, so it seems to be a Windows specific problem.
Any further clues? Maybe itīs bug? I donīt know...
PS: I am using NTFS with WindowsXP.
Dirk
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer