Author Topic: Makefile Generator Script v1.100 *** Error [000]  (Read 2546 times)

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Makefile Generator Script v1.100 *** Error [000]
« on: 2016 January 17 21:29:24 »
PixInsight Core 01.08.04.1195 Ripley (x64)
Win7
Console:
==> Generating makefile:
C:/PCL/src/modules/processes/Sandbox/host/g++/makefile-x64
* Directory created: C:/PCL/src/modules/processes/Sandbox/host/g++/x64/Release

==> Generating makefile:
C:/PCL/src/modules/processes/Sandbox/host/g++/Makefile
*** Error [000]: C:/PCL/x64/src/scripts/MakefileGenerator/MakGenUtility.js, line 136: Error: removeDirectory(): Relative directory.


PS. of course, I can remove directory manually, but... 

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Makefile Generator Script v1.100 *** Error [000]
« Reply #1 on: 2016 January 19 06:06:44 »
Yes, this is a bug. Lines 135 and 136 of MakGenUtility.js are:

   if ( dirPath.indexOf( '/' ) != 0 )
      throw new Error( "removeDirectory(): Relative directory." );


This is a safeguard test to prevent the uncontrolled removal of files outside a prescribed directory tree recursively, which could have disastrous consequences. The test works fine on UNIX/Linux filesystems. However, on Windows all absolute paths start with a "<u>:" drive specifier, so the root directory slash is not the first character of an absolute path on Windows.

I'll fix this problem ASAP with an update. Thanks for discovering it.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Makefile Generator Script v1.100 *** Error [000]
« Reply #2 on: 2016 January 19 20:06:12 »
Thanks.