phatch-dev team mailing list archive
-
phatch-dev team
-
Mailing list archive
-
Message #00028
[Bug 381091] Re: unexpected multiple save actions behaviour
** Changed in: phatch
Importance: Low => Medium
--
unexpected multiple save actions behaviour
https://bugs.launchpad.net/bugs/381091
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.
Status in Phatch = Photo & Batch!: Confirmed
Bug description:
If you add multiple save actions the resulting behaviour is unexpected.
Let's say I'm executing the following actionlist:
{'actions': [
{'fields': {'In': u'<folder>_phatch1/<subfolder>'},
'label': 'Save'},
{'fields': {'In': u'<folder>_phatch2/<subfolder>'},
'label': 'Save'},
{'fields': {'In': u'<folder>_phatch3/<subfolder>'},
'label': 'Save'}],
'description': u'Describe here the action list.'}
The resulting images will be written to:
<folder>_phatch1/
<folder>_phatch2/phatch1/
<folder>_phatch2/phatch2/phatch1/
If you remove <subfolder> from paths the resulting images will be written to:
<folder>_phatch1/
<folder>_phatch2/
<folder>_phatch3/
After some debugging I think I know the cause of this behaviour. <subfolder> is calculated like this:
info[_t('subfolder')] = dirname[len(info[_t('folder')])+1:]
But when an image is saved, its location info (or dirname) changes to the new save location. After the first save the dirname becomes <folder>_phatch1/ and as a result subfolder will be phatch1