Just found this (Gambas 2 project) when copying several students from
one class into another. For each student, there are about 6 files to be
copied from one directory into another. The first one will always get
standard chgrp and chown of the application's user. The other files
SOMETIMES are copied with correct group and ownership, MOSTLY not.
All files have special group and ownership, controlling if teachers or
only the office can access the data.
Now, this is the function that does the actual copy:
'kopiert alle Dateien eines Namens in eine andere Kartei
'- ziel ist der Zielpfad
'- wenn eine gleichnamige Datei schon vorhanden ist, kommt "-1" zurück
'- wenn es geklappt hat, kommt "0" zurück
'wird z. B. von dlgNamenKopieren benutzt
PUBLIC FUNCTION NamenKopieren(schlyssel AS String, ziel AS String) AS
Integer
DIM original AS String
DIM odatei AS String
DIM opfad AS String
DIM datei AS String
original = getFilename(schlyssel)
odatei = file.BaseName(original)
opfad = file.Dir(original)
IF Exist(ziel &/ odatei & ".felder") THEN
RETURN -1
END IF
FOR EACH datei IN Dir(opfad, odatei & ".*")
COPY opfad &/ datei TO ziel &/ datei
NEXT
RETURN 0
END
Do you see anything wrong here? As it sometimes works correctly I would
actually think that it's a bug in copy.
The filesystem is ext3.
Regards
Rolf
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user