enthought / enthought/bzip2-1.0.6

bzdiff creates empty tmp files and leaves them

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The script creates the temporary file unconditionally, but only deletes it if both the targets are .bz2 files.

For Instance:

[10 01:49] kwatram@argon37: ~> lt /tmp | head
total 1940
-rw-r--r-- 1 root root 14440 Apr 10 01:49 pim.info.argon37.nyc.deshaw.com
-rw------- 1 root root 764 Apr 10 01:48 krb5cc_0_4974_cron_TwpGBN
-rw-r--r-- 1 root root 10 Apr 10 01:45 last_healthcheck
-rw------- 1 chenp wheel 609 Apr 10 01:44 krb5cc_13068
drwx------ 6 kwatram wheel 120 Apr 10 01:42 129343213.tmpdir
-rw------- 1 peeqtrd wheel 581 Apr 10 01:34 krb5cc_3050
-rw------- 1 s1trd wheel 609 Apr 10 01:19 krb5cc_3017
-rw------- 1 mouser mouser 611 Apr 10 01:09 krb5cc_5468
-rw------- 1 wongp wheel 609 Apr 10 01:04 krb5cc_13149_6366_sshd_bONoIC6366

[10 01:49] kwatram@argon37: ~> bzdiff Reuters_trade_price_cumVol_Columns.txt Reuters_trade_price_cumVol_Columns.txt.bz2

[10 01:50] kwatram@argon37: ~> lt /tmp | head
total 1964
drwx------ 6 kwatram wheel 140 Apr 10 01:50 129343213.tmpdir
-rw------- 1 root root 764 Apr 10 01:50 krb5cc_0_5394_cron_cE0mBx
-rw------- 1 root root 764 Apr 10 01:50 krb5cc_0_5393_cron_XZVyou
-rw------- 1 root root 764 Apr 10 01:50 krb5cc_0_5397_cron_MNjbPx
-rw------- 1 root root 764 Apr 10 01:50 krb5cc_0_5395_cron_NSJPsu
-rw------- 1 root root 764 Apr 10 01:50 krb5cc_0_5396_cron_rj9Gmu
-rw------- 1 root root 764 Apr 10 01:50 krb5cc_0_5398_cron_iVRwou
-rw-r--r-- 1 root root 14441 Apr 10 01:49 pim.info.argon37.nyc.deshaw.com
-rw------- 1 root root 764 Apr 10 01:48 krb5cc_0_4974_cron_TwpGBN
[10 01:51] kwatram@argon37: /tmp/129343213.tmpdir> lt /tmp/129343213.tmpdir | head
total 0
-rw------- 1 kwatram wheel 0 Apr 10 01:50 bzdiff.1khUHz6QER
drwx------ 2 kwatram wheel 40 Mar 30 07:08 python-eggs.j9P8Eg
drwx------ 2 kwatram wheel 40 Mar 30 06:48 python-eggs.j4uQrK
drwx------ 2 kwatram wheel 40 Mar 30 06:27 python-eggs.Q4hUQp
drwx------ 2 kwatram wheel 40 Mar 29 09:45 python-eggs.nGFDfg

The tmp file bzdiff.1khUHz6QER is not removed.

Thanks,
Mohit

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the bzdiff script and trace how it creates and removes its temporary file when one target is not compressed. Reproduce the mixed .bz2 and non-.bz2 invocation shown in the issue, then verify that no empty temporary file remains afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.