Hi,
Does somebody else get GSOD when hitting BLUE button (rename) when selector is positioned at <List of Storage Devices>?
Hi,
Does somebody else get GSOD when hitting BLUE button (rename) when selector is positioned at <List of Storage Devices>?
Which file browser?
Sorry, this one: /usr/lib/enigma2/python/Plugins/Extensions/Filebrowser
I can fix it in github. But I'd have expected from a member of an image team that you provide as well a crash log. I know where it might happen but still.
it's already pushed
Hi again,
I did test out the code you pushed, but it seem not to work. Now all buttons wont do anything regardless of what directory or file you pick.
I'll check it. The popup was shown when I was on a file. For directories it's diabled as I wrote in the commit.
Sorry, but you did something wrong! It works like a charm! I could rename and delete files without any problem. Directories were never properly implemented in this plugin. Move would work. Delete for sure not. Rename works too.
OK, did my tests only on directories, and should not have guessed that it did not work for files. Sorry for that.
Well done, no gsod is what we want.
Deleting directory would require to change the command (like it is done in DreamExplorer). Maybe, I can find the time tmr.
Thanks, it would be fantastic if you could make everything work for both directories and files.
Please test and report. Btw: I doubt anything ever worked with directories!
I will be back with an report!
I have pushed a fix. I only copied the logic from the other buttons.
I asumed that that might be the missing thing. I'll be back!
Hi,
Now I got "cp: ommitting directory '/tmp/.font-unix' " when copying directories. Googled a bit and found that directory copy should have -R option.
cmd = ["cp -R \""+filename+"\" \""+targetDir+"\""]
Then I found that def goYellow def still misses the stuff that you did with the goGreen def (titletext). And the string compilated for copy should be identical to the string for move def.
self.session.openWithCallback(self.doCopy,ChoiceBox, title = titletxt+"?\n%s\nfrom %s to %s"%(filename,sourceDir,targetDir),list=[(_("yes"), True ),(_("no"), False )])
Here is the code I made that makes everything working. I love the simplicity of this plugin and no it work for both directories and files! Thank you very much @dre!
def goYellow(self):
if not(self.SOURCELIST.canDescent()) or (self.SOURCELIST.canDescent() and self.SOURCELIST.getSelectionIndex()!=0):
filename = self.SOURCELIST.getFilename()
sourceDir = self.SOURCELIST.getCurrentDirectory()
targetDir = self.TARGETLIST.getCurrentDirectory()
if self.SOURCELIST.canDescent():
titletxt = _("copy directory")
else:
titletxt = _("copy file")
self.session.openWithCallback(self.doCopy,ChoiceBox, title = titletxt+"?\n%s\nfrom %s to %s"%(filename,sourceDir,targetDir),list=[(_("yes"), True ),(_("no"), False )])
else:
return
def doCopy(self,result):
if result is not None:
if result[1]:
filename = self.SOURCELIST.getFilename()
sourceDir = self.SOURCELIST.getCurrentDirectory()
targetDir = self.TARGETLIST.getCurrentDirectory()
if self.SOURCELIST.canDescent():
cmd = ["cp -R \""+filename+"\" \""+targetDir+"\""]
titletxt = _("copying directory ...")
else:
cmd = ["cp \""+sourceDir+filename+"\" \""+targetDir+"\""]
titletxt = _("copying file ...")
self.session.openWithCallback(self.doCopyCB,Console, title = titletxt, cmdlist = cmd)
Alles anzeigen
I'll update it.