https://issues.apache.org/ooo/show_bug.cgi?id=118886
Bug #: 118886
Issue Type: DEFECT
Summary: Copy Method from com.sun.star.ucb.SimpleFileAccess
failed when copying external file
Classification: Code
Product: api
Version: OOo 3.3 RC10
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: code
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Bug with the following method if the StartFile comes from a distant server.
demenageur = createUnoService("com.sun.star.ucb.SimpleFileAccess")
demenageur.copy(StartFile, ArrivalFichier)
Exemple:
Sub CopieDeFichier
dim oDoc, oSheet, oCell
oDoc = ThisComponent
REM ***** COPIE D'UN FICHIER DANS LE DOSSIER COURANT *****
REM ***** RECHERCHE DU DOSSIER COURANT *****
Chemin = oDoc.location
FichierDepart = Chemin
i=0
'Recherche le nom du dossier du fichier courant
For i=Len(Chemin) to 1 step -1
If Right(Left(Chemin, i), 1) = "/" then
'Nom du dossier ou est le fichier courant
Chemin = Left(Chemin, i)
exit for
end if
next
FichierArrivee = Chemin & "Nouveau Fichier.ods"
REM ***** COPIE D'UN FICHIER LOCAL - OK NO BUG (rename and copy) *****
dim demenageur As Object
demenageur = createUnoService("com.sun.star.ucb.SimpleFileAccess")
demenageur.copy(FichierDepart,FichierArrivee)
REM ***** COPIE D'UN FICHIER DISTANT - ERREUR *****
' Please write your own distant file's address as below
'FichierDepart =
ftp://dossier%40monsite.com:[email protected]/MonFichier.ods"
demenageur = createUnoService("com.sun.star.ucb.SimpleFileAccess")
demenageur.copy(FichierDepart,FichierArrivee)
'in this case, an error message appear
end sub
--
Configure bugmail: https://issues.apache.org/ooo/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.