From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,17f674692867d416 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!d20g2000yqh.googlegroups.com!not-for-mail From: vlc Newsgroups: comp.lang.ada Subject: Re: Atomic file creation Date: Tue, 5 Jan 2010 06:48:33 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 87.221.73.161 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1262702914 2209 127.0.0.1 (5 Jan 2010 14:48:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 5 Jan 2010 14:48:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d20g2000yqh.googlegroups.com; posting-host=87.221.73.161; posting-account=ROuOHgoAAABopjDuvPBd02HgYVR-VCZk User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8613 Date: 2010-01-05T06:48:33-08:00 List-Id: On Jan 5, 5:16=A0am, Stephen Leake wrote: > Ada.Text_IO.Rename is not in the LRM. Ada.Directories.Rename is. > > Some OS's don't allow renaming files across devices; if you are on > Unix, and Temp_File is /tmp/.., while "file" is /usr/..., and /tmp is > mounted to disk1, while /usr is mounted to disk2, that might explain > the use error. Source and target are on the same device, but in different partitions. Maybe that's an issue (?). > It does seem you need to use an OS specific Form parameter to > Copy_File. > > I think it's a bug that Rename raises Use_Error if Target_Name exists, > but Copy_File does not, since Copy_File is supposed to be used to > rename a file across devices. Maybe it's a bug, in any case it's confusing ... Thanks!