Qt Install Framework CopyDirectory
-
Hi
Qt Install Framework 3.1.1.
Windows & Mac.I'm trying to copy the directory with following code snippet during the installation.
var sourceDir = "/Users/dheeru/Desktop/Bax1"; var destDir = "/Users/dheeru/Desktop/dheeru"; var val = installer.performOperation("CopyDirectory"[sourceDir,destDir,"forceOverwrite"]);
This does not work. Any idea about this ?
-
Hi
Qt Install Framework 3.1.1.
Windows & Mac.I'm trying to copy the directory with following code snippet during the installation.
var sourceDir = "/Users/dheeru/Desktop/Bax1"; var destDir = "/Users/dheeru/Desktop/dheeru"; var val = installer.performOperation("CopyDirectory"[sourceDir,destDir,"forceOverwrite"]);
This does not work. Any idea about this ?
@dheerendra Hi, what's the value of val after the operations fails?
-
false. It is not copying the contents.
-
-
Oh Sorry. It is typo when I did copy-paste here.
Actual code is
var val = installer.performOperation("CopyDirectory", [sourceDir,destDir,"forceOverwrite"]);
Priviledges are perfectly fine. It does not copy.
-
After analysing the QtIFW source code, Here is my final input on this.
With the following code snippet we think that
- Contents of 'Bax1' will be copied to 'dheeru' directory.
- This understanding is wrong.
- Documentation also does not clearly explains this.
var sourceDir = "/Users/dheeru/Desktop/Bax1"; var destDir = "/Users/dheeru/Desktop/dheeru"; var val = installer.performOperation("CopyDirectory",[sourceDir,destDir,"forceOverwrite"]);
Following is the actual meaning of above code.
- Actually 'Bax1' directory itself get cloned in to 'dheeru' directory
- 'Bax1' directory should be already existing under 'dheeru' directory before starting the CopyOperation.
- If the 'Bax1' directory does not exist under 'dheeru', copy fails.
I will file the documentation Documentation bug and fix the same as well.