Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On windows cp: cannot create regular file '//ipfilter.p2p': File exists #5

Closed
Janaue opened this issue May 8, 2020 · 5 comments
Closed

Comments

@Janaue
Copy link

Janaue commented May 8, 2020

i have w10 1809 and use the portablegit to compile the list
The download is successful but there is a problem to get the final file

MINGW64 /
$ ./ipfilter.sh

--==[ IP Filter Updater & Generator ]==--

Creating temporary folder...
Downloading I-BlockList blocklists...
Downloading I-BlockList blocklist 'level2'...
Downloading I-BlockList blocklist 'level3'...
Downloading I-BlockList blocklist 'level1'...
Decompressing I-BlockList blocklists...
Decompressing I-BlockList blocklist 'level2'...
Decompressing I-BlockList blocklist 'level3'...
Decompressing I-BlockList blocklist 'level1'...
Merging I-BlockList blocklists...
Merging I-BlockList and GeoLite2 blocklists...
Installing final IP filter file...
cp: cannot create regular file '//ipfilter.p2p': File exists
An error occured, aborting.
Removing temporary folder...

I go to C:\Users\XXXX\AppData\Local\Temp\ and I see a folder Ipfilter.Randomstuff created, with all the lists appearing from iblocklist, then a file ipfilter.p2p appears, 17MB, then the whole folder is deleted when the error appears on the console.

In the conf file, i selected the DST path like this

# Path final output file shall be installed to (folder + file name)
# (NOTE: ${SCRIPT_DIR}: path to location of ipfilter script, ${SCRIPT_NAME}: filename of ipfilter script without extension)
# Format:  String
# Example: INSTALL_DST="/tmp/blocklist.p2p"
# Default: INSTALL_DST="${SCRIPT_DIR}/${SCRIPT_NAME}.p2p"
INSTALL_DST="D:\XXXXX\PortableGit\ipfilteriblocklist.p2p"

it fails also with the conf file being 100% original.

@Janaue
Copy link
Author

Janaue commented May 8, 2020

I understand even less the .conf file. I added a geolite key and i extended the iblock lists to all lists, but it is still the lists of level 1, 2, 3 which are downloaded and the geolite list is 0kB. I uncommented all the lines where I customized the configuration.

I put the ipfilter.conf and ipfilter.sh in the portableGit folder, directly so it is easier to launch.

@fonic
Copy link
Owner

fonic commented May 8, 2020

It would seem ipfilter.conf is not read at all for you, as I-BlockList Level 1 + 2 + 3 and no GeoLite2 is the default. Let me check this.

@fonic
Copy link
Owner

fonic commented May 8, 2020

I can confirm this issue, this is a bug I need to fix. For now, please put the script inside a subdirectory, e.g. D:\XXXXX\PortableGit\ipfilter, it will work fine there. It will currently not work in /, which for PortableGit is the folder where git-bash.exe is located.

@Janaue
Copy link
Author

Janaue commented May 9, 2020

Yes your solution works well.

fonic added a commit that referenced this issue May 11, 2020
Third release:
- add support for Cygwin, MSYS2 and Linux on Windows Subsystem
  for Linux (WSL)
- improve/rework notifications
- use realpath to determine actual folder and filename of script
  on all platforms except macOS; script now works as expected when
  being run via symlink
- inform user and abort if configuration file could not be read/
  located (related to issue #5)
- implement fix for issue #5; script now works as expected when
  being run from '/' on Git for Windows
- apply additional minor changes (comments, code improvements,
  code formatting, console prints, command line arguments)
- update README
@fonic
Copy link
Owner

fonic commented May 11, 2020

Fixed in release ipfilter-v3.0.

@fonic fonic closed this as completed May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants