[Python-bugs-list] [ python-Bugs-546749 ] odd exception moving file to trash
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 22 Apr 2002 08:23:37 -0700
Bugs item #546749, was opened at 2002-04-21 15:11
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=546749&group_id=5470
Category: Macintosh
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Just van Rossum (jvr)
Assigned to: Jack Jansen (jackjansen)
Summary: odd exception moving file to trash
Initial Comment:
MacPython 2.2.1 on OSX.1.4, from IDE:
>>> import macfs, findertools
>>> f = open("a_file_to_trash", "w")
>>> f.close()
>>> fss = macfs.FSSpec("a_file_to_trash")
>>> vrefnum = fss.as_tuple()[0]
>>> vrefnum, pardir = macfs.FindFolder(vrefnum,
"trsh", 1)
>>> trashfolder = macfs.FSSpec((vrefnum, pardir,
"")).as_pathname()
>>> findertools.move("a_file_to_trash",
trashfolder)
Traceback (most recent call last):
File "<input>", line 1, in ?
File "Titaantje:Applications:Python
2.2.1:Mac:Lib:findertools.py", line 74, in move
return finder.move(src_fss, to=dst_fss)
File "Titaantje:Applications:Python
2.2.1:Mac:Lib:lib-
scriptpackages:Finder:Standard_Suite.py", line
293, in move
raise aetools.Error,
aetools.decodeerror(_arguments)
aetools.Error: (0, 'component result = no error',
None)
>>>
The file _does_ get moved to the trash, but that's
not visible in the Finder's Trash window, not even
after more items are dragged to the trash
manually.
----------------------------------------------------------------------
>Comment By: Just van Rossum (jvr)
Date: 2002-04-22 17:23
Message:
Logged In: YES
user_id=92689
(sorry for the duplicate...)
Yes I'm sure: there's nothing visible in the Finder, but it
does show with "ls" in the terminal. New finding: it
_does_ show if the trash wasn't empty before...
----------------------------------------------------------------------
Comment By: Jack Jansen (jackjansen)
Date: 2002-04-22 15:18
Message:
Logged In: YES
user_id=45365
This is a duplicate of #493826. I'm leaving this in too, though, because the bit about the resulting file not being visible in the thrash is something not in the other error report.
Also, a question: are you sure about not seeing the result in the Trash window? I *am* seeing it there. And I'm tempted to think that errn==0 simply doesn't signal an error...
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=546749&group_id=5470