Author Topic: MOVE problems: symlinks and uninstallation  (Read 1163 times)

Offline Turambar90

  • Planewalker
  • *****
  • Posts: 32
  • Gender: Male
MOVE problems: symlinks and uninstallation
« on: March 03, 2012, 06:35:29 AM »
I've noticed that mods such as Generalized biffing fail if you physically have the folder on one partition, and the game on another one, and only have a symlink to the generalized biffing folder inside your bg2 folder. The error is, for instance,
ERROR: Unix.Unix_error(36, "rename", "override/naeriem.bmp")
Is it possible to use a real "move" command/system call, or a "copy and delete", or however it usually works, so that it becomes possible to move files through partitions and symlinks?
It could be useful, for instance, if I want to have the back ups on a separate removable disc, to reduce my main disc usage, or to test mods without always having to update two folders at the same time.

Moreover, the fact that MOVE commands are reverted from the first to the last makes this sort of actions really difficult:
move a to b and b to c
swap files a and b
I have to use huge combinations of MOVE and MOVE+ to manage to uninstall this this, and if one of the actions fails in the middle, restoring original state becomes really painful.
With normal files, I could just use COPY, and that would automatically generate back ups, but when those files are audios or images, that could require much more disk space.
If you fear it could break compatibility, could you introduce a flag such as UNINSTALL_MOVE_REVERSED, REVERT_MOVE_LOGICALLY or similar?

Finally, is it possible to add following features: DELETE and DELETE +; the former automatically moves the file to the backup folder (this could help to make functions easier to port; otherwise, it is necessary to always specify the backup folder; if it's easier, a %BACKUP% variable should work the same; I could use MOVE ~file~ ~%BACKUP%/%COMPONENT_NUMBER%~); the latter completely removes the file without requiring AT_ actions, which are generally less reliable than weidu
I sometimes use that when I use DISABLE_FROM_KEY, in order to also remove anything left in override
« Last Edit: March 03, 2012, 07:50:18 AM by Turambar90 »

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: MOVE problems: symlinks and uninstallation
« Reply #1 on: April 08, 2012, 03:52:46 PM »
1. I don't think that OCaml offers me enough access to the file system to implement a proper move function. Do you want me to keep looking?

2. Done. No need for a flag, since anybody who used that construct would've shipped a non-working mod.

3. Done.
« Last Edit: April 08, 2012, 04:00:48 PM by the bigg »
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: