[PLUG] Left over "artifact?" when doing screenshots, sometimes
Dick Steffens
dick at dicksteffens.com
Mon Jan 24 03:56:47 UTC 2022
On 1/23/22 7:34 PM, wes wrote:
> On Sun, Jan 23, 2022 at 6:56 PM Dick Steffens <dick at dicksteffens.com> wrote:
>
>> Sometimes, when I do a screenshot, I get, in addition to the image I
>> want, another "file" that ends in .part.
>
> this is a result of a complicated solution created to solve a
> seldom-experienced problem. however, when this problem does happen, it can
> be very annoying to the user, so the complexity was decided to be worth it.
>
> the problem is: what happens if we do something (take a screenshot,
> download a file, etc) but this operation takes some time to complete?
>
> the application (screenshot utility, web browser, whatever) can approach
> this in a few different ways. the old, simple way, was to start writing the
> file immediately, and let it finish whenever it finishes. but then, what if
> the user tries to open it or do something else with it while it's still
> being written?
>
> the first solution was to download the file somewhere else first, like say,
> a temp directory or the browser's cache directory, etc. the downside to
> this method is, what happens when the user goes to look for their file and
> doesn't find it? they'll naturally conclude there's a problem and it's
> obviously the web browser's (etc) fault.
>
> so then they came up with this compromise: first we'll create an empty file
> with the name of whatever we're creating, say abc.jpg for example. but
> we'll start writing the _content_ of that file to abc.jpg.part, so the user
> can't mess with it. then, once the write operation is complete, we'll
> _move_ the .part file into the place of the original file. a move operation
> almost always completes immediately, so there is basically no chance of
> something happening in the middle to screw something up.
>
> this scheme has been abstracted and put into software libraries so it's
> much more widely used than it really needs to be.
>
> While it shows up on Caja, but
>> it doesn't show up in the terminal. Attempting to delete it gives me an
>> error message telling me there is no such file or directory. It goes
>> away if I reboot, but I don't know another way to get rid of it.
>>
>>
> it shows up in Caja (whatever that is)
Caja is the GUI file browser used in Linux Mint Mate.
> because the file existed for a split
> second. Caja was notified of the file's creation, but not of the file's
> subsequent removal. this is why it doesn't show up in terminal: it's
> actually not there. Caja may maintain some sort of cache or running tally
> of which files exist, which it updates periodically. I would guess that if
> you just wait a while, the .part file will probably go away. it may also be
> possible to instruct Caja to refresh its index without rebooting.
It doesn't go away until after a reboot. I haven't tried anything else,
though.
> if it
> were me, I would just ignore it. if it annoys you enough, you can take the
> time to look through all the options in Caja to see if there is something
> related to this, or search on terms like, Caja refresh file index or
> similar.
Ignoring it works. I have enough screen real estate to shove it into a
corner. I'll probably put a little time into seeing if there is a way to
refresh something in Caja, but it's not a high priority. If something
turns up, I'll report back.
Thanks.
--
Regards,
Dick Steffens
More information about the PLUG
mailing list