microelly2 / freecad-pluginloader

GNU Lesser General Public License v3.0
10 stars 7 forks source link

Problem installing plugins #9

Closed kkoksvik closed 9 years ago

kkoksvik commented 9 years ago

Hi, Just finished making a new PKBUILD that installs freecad the same way as ubuntu. but I am still having problems installing the plugins. My investigation have led me to be quite confused. 1) In pluginloader.py line 370 directory=zipextract+"/.." line 379 os.makedirs(directory) This does not make sense to me, whenever I try to test this in a python console i get error message that "OSError: [Errno 17] File exists: '/home/kjetil/testtes/..'"

2) In pluginloader.py line approx 460 os.rename(source, destination) this command does not work as long as source and destination are on the same physical partition. This makes problems when Home folder is on separate partition.

Trying to use shutil.move(), but it behaves differently if source is file or folder and if destination is empty or not. adding a new "homedir" in yaml file and doing some shuffeling with foldernames i can get one by one plugin to install. It requires messing and changing the yaml file for every plugin.

I do not understand why it works for you on Ubuntu and not for me on Arch.

What happens on your end if you run the following in ipython import os directory="/home/micronelly2/test"+"/.." os.makedirs(directory)

microelly2 commented 9 years ago

I have played a little bit with shutil.move() please check my modifications.

kkoksvik commented 9 years ago

Your changes has helped, and installation seams stable.